es6-sass
ES6 and SASS Starter Kit to build javascript ES6/SASS project runnable on any browser
Last updated 3 years ago by daaif .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install es6-sass -g
SYNC missed versions from official npm registry.

ES6 and SASS Starter Kit to build javascript ES6/SASS projects runnable on any browser

Description

ES6 NOW ! Focus on development not on tooling !

The purpose of this package is to set up a development environment that supports es6 (es2015) and the sass preprocessor. Installing this package globally allows you to create a boilerplate project and give you via the command line tool es6-sass the ability to transpile javascript es6 to one bundled minified es5 file and sass files to a single compressed css file. The command line tool es6-sass allow you to :

  1. init project
  2. transpile an bundle es6 to es5
  3. transpile .scss files to .css single file
  4. eslint your javascript
  5. uglify your javascript
  6. compress your css
  7. watching mode for js an scss change

###The structure of the generated project is as follows:

 your_project/
 |_ node_modules/    # node modules folder
 |_ src/
 |     |_ js /    # Put here your es6 js files, you can create subfolders
 |     |     |_ main.js
 |     |_ scss /  # Put here your scss files, you can create subfolders
 |_ dist/
 |     |_ js /    # generated es5 file
 |     |     |_ main.js
 |     |     |_ main.min.js
 |     |_ css /  # generated css file
 |            |_ main.css
 |            |_ main.css.map
 |_ .es6-sass       # configuration file
 |_ .eslintrc       # eslint configuration file
 |_ index.html      #
 |_ package.json    # 

1 - Installation

This package must be installed globally.

npm install -g es6-sass

2 - Create new project

mkdir my-project
cd my-project
es6-sass init     # generates the structure of the project

3 - Usage

es6-sass build       # transpiles and bundles es6 to es5 single file
es6-sass sass        # transpile .scss files to css file and generate sourceMap file
es6-sass minify      # uglify and generates .min.js file and compress .css file
es6-sass eslint      # parse js files and show errors according to .eslintrc config file
es6-sass watch       # enables the watch mode on all js an scss files

4 - Customize es6 and scss entries

es6-sass init generates a default .es6-sass config file. you can change defaults.

module.exports  = {
    /**
     * the name bundled output files main.js and main.css
     * Olso the js namespace in the global scope window.main
     */
    library: 'main',
    /**
     * ES6 source folder. All subfolders are scanned
     */
    jsBasePath: 'src/js',
    /**
     * SASS source folder. All subfolders are scanned
     */
    scssBasePath: 'src/scss',
    /**
     * ES5 destination folder.
     */
    jsDest: 'dist/js',
    /**
     * SASS destination folder.
     */
    cssDest: 'dist/css'
};

Current Tags

  • 1.0.3                                ...           latest (3 years ago)

4 Versions

  • 1.0.3                                ...           3 years ago
  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 1
Last Day 1
Last Week 0
Last Month 7
Dependencies (10)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |