Git Product home page Git Product logo

Comments (5)

evilsoft avatar evilsoft commented on May 15, 2024 1

There are indeed plans, but even though the latest v8 version supports it now, need to wait for (2) things: AWS Lambda to move to the latest version of node and the rest of the browsers to catch up. One of the things I do personally, is bring in ramda and crocks functions into a "helpers" file where I:

export const State = require('crocks/State')
export const evolve = require('ramda/src/evolve')
...

// then I can
import { evolve, State } from '../utils/helpers'

There are other benefits to this approach (while we wait for the world to catch up). The problem is, it puts people who are not transpiling in the awkward position to have to require('crocks/Sum').default all over the place. Soon though, it will be a requirement to have this done before we go to 1.x.

That said, I am open to suggestions to avoid the .default thing and get this out sooner.

from crocks.

evilsoft avatar evilsoft commented on May 15, 2024 1

@gunins Okay. Was talking with someone today and I have a solution to make every one happy.
Will have es6 module support in the next release.

from crocks.

bennypowers avatar bennypowers commented on May 15, 2024 1

Please consider appending the .js extention to import paths, which would allow importing crocks members directly in the browser, sans build-step.

<script type="module">
import Async from '/node_modules/crocks/src/Async/index.js';
</script>

date-fns follows this approach, see for example https://github.com/date-fns/date-fns/blob/master/src/esm/index.js

from crocks.

gunins avatar gunins commented on May 15, 2024

That's will be great. New chrome and Nodejs support es6 modules nativelly.

Thanks!

from crocks.

dalefrancis88 avatar dalefrancis88 commented on May 15, 2024

This seems to have a resolution, feel free to open if there is any more to add here

from crocks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.