Developed with Gulp, PixiJS, Sass, Pug, Babel, ES2015, webpack
Simple platformer developed as a present. Based on PixiJS + MethMethMethod playlist on youtube
- Best practice for HTML5, CSS and JavaScript organization
- Code validation (HTML, JS, CSS)
- HTML Templating
- CSS Preprocessing
- Node version >= 4
- NPM or Yarn
- Sass
gem install sass
# clone the repo
git clone https://github.com/gairal/gulp-webpack-es2015-stack.git
# change directory to the repo
cd gulp-webpack-es2015-stack
# install the repo with npm or yarn
npm install
OR
yarn install
# start the server
gulp
go to http://localhost:3000 in your browser
gulp-webpack-es2015-stack/
├──config/ * configuration files and Gulp taks
│ ├──gulp/ * Gulp tasks descriptions
│ ├──.htmlhintrc * htmlhint configuration file
│ ├──.eslintrc.json * eslint configuration file
│ ├──.sass-lint.yml * sasslint configuration file (Yaml format)
│ ├──config.json * variables used got Gulp tasks
│ └──webpack.conf.js * Webpack configuration file
│
├──src/ * our source files that will be compiled to javascript
│ ├──index.pug * our index.html
│ │
│ ├──html/ * where you keep your pug templates
│ │ └──layout.pug * the main pug layout
│ │
│ ├──app/ * JavaScript/ES2015 files
│ │
│ ├──static/ * files that will be copied to the root of the compiled site (robots.txt, favicon, ...)
│ │
│ └──assets/ * static assets are served here
│ ├──img/ * images
│ └──scss/ * Sass files
│ ├──app.scss * Main Sass files
│ └──common/ * Sass common files
│ ├──_bootstrap.scss * Bootstrap Sass module import file
│ ├──_mixins.scss * for you own Sass mixins here
│ └──_variables.scss * for your sass variables
│
├──test/ * Testing directory
│ └──spec/ * Jasmine test definitions
│
│
├──gulpfile.js * gulp main configuration file
└──package.json * what npm/yarn uses to manage it's dependencies
You need to install the following on you system
node
andnpm
(brew install node
) oryarn
(brew install yarn
)- Ensure you running Node version >= 4.0.0
- ruby (
brew install ruby
)
Then install tools you'll need to run the app
- sass (
gem install sass
) - gulp (
npm install gulp -g
)
fork
this repoclone
your forknpm install
to install all dependenciesgulp
to start the dev server
After all dependencies are installed, just run gulp
to start a local server using browser-sync
which will watch your files and build them.
browser-sync will display the address and port of your server (by default, http://0.0.0.0:3000
).
# build files then launch the server and watch files
gulp
# compiled version
gulp run:dist
# build files in ./build/ (Webpack, Sass, Jade) and validate them
gulp build
# "compile" files in ./compile/
# minify and concatenate every css and js including
# Optimize images compression
# Site ready for production
gulp compile
# runs the validations htmlhint, eslint, csslint, sasslint, TsLint
gulp validate
# compile files then get the last git tag and create a zip named after it
gulp delivery
# compile the site then send it to a given server path over scp
gulp deploy
Most of the configuration files are in ./config
config.json
: contains the paths to the various kind of files used by Gulp.eslintrc.json
: eslint config file.sass-lint.yml
: sasslint config filewebpack.conf.json
: Webpack config file