Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting up build for using ES6 #1

Closed
nicolas-zozol opened this issue May 28, 2016 · 10 comments
Closed

Setting up build for using ES6 #1

nicolas-zozol opened this issue May 28, 2016 · 10 comments

Comments

@nicolas-zozol
Copy link
Collaborator

Hello @d-plaindoux
I have set ES6 with grunt-babel and jshint does correctly his job. Grunt needs to be at 0.4 old version because of grunt-coverage dependency.

At the end babel produces a dist/app.js ES5 file with sourcemap. Options are defined in the Gruntfile.

When running grunt --gruntfile Gruntfile_Coverage.js,I have no error but I have seen no coverage information, and no lib-cov/report directory. What is it supposed to do ?

If it's ok, I will ES6 everything as soon as possible.

@nicolas-zozol
Copy link
Collaborator Author

Of course Typescript is also an option, or we can create for Users some TypeScript interface when Parsec is an external project.

@d-plaindoux
Copy link
Member

If you want to "ES6" everything your are welcome. For Typescript support providing an interface can be a good approach.

About the code average I will check and fix the problem related to the code coverage (tools outdated) ASAP.

@d-plaindoux
Copy link
Member

The command grunt --gruntfile Gruntfile_Coverage.js is supposed to perform unit tests and code coverage report generation. Then such report is pushed to coverall.io. These tools work fine in travis but with an old node version: 0.10.41 (december 2015).

@nicolas-zozol
Copy link
Collaborator Author

In ES6, it's not possible to make some import with variable such as :

import {Genlex} from '../../lib/'+ (process.env.COVERAGE || '') +'parsec/genlex';

I'm investigating how to mix ES6 with coverall.io

@d-plaindoux
Copy link
Member

May be a good starting point can be: https://github.com/vinniegarcia/es6-module-starter.
Do we need Grunt anymore? Two package managers is useless since npm is enough!

@d-plaindoux
Copy link
Member

Code coverage process has been reviewed. The new version uses recent node and grunt-istanbul task.

@nicolas-zozol
Copy link
Collaborator Author

nicolas-zozol commented Jun 15, 2016

I was just working on it also :)
There will still a problem with parsec/test/require_helper.js

return require((process.env.APP_DIR_FOR_CODE_COVERAGE || '../lib/') + path);

By the way for what I heard, Grunt is kind of obsolete. It needs plugins, and people do less and less plugins for Grunt.

I'm trying the vinniegarcia starter. I've looked some other, but this one is thin. I've connected a test module to travis and coverage, I guess I will be able to check if it's good and easy tomorrow or friday.

@nicolas-zozol
Copy link
Collaborator Author

It works good : https://coveralls.io/builds/6623402
No gulp or grunt, just npm scripts that are set up in package.json
Next, I will adapt this again for parsec.

@nicolas-zozol
Copy link
Collaborator Author

We need to change the coveralls repo name. It's totally out of date: https://coveralls.io/github/d-plaindoux/parsec

@d-plaindoux
Copy link
Member

Change done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants