A Gulp template for starting full-page interactive projects at the Sun Sentinel.
Use the Sun Sentinel's Yeoman interactives generator to generate a project with this template.
Or, you can clone use this template manually with https://github.com/SunSentinel/starterkit.git MyApp
.
If you're using this as a template for a new project, remove the existing git repo with rm -rf .git
and initialize a new repository for the new project with git init
Whatever you name the project, in this case "MyApp", will be the name of the folder it will be deployed to on the projects.sun-sentinel.com bucket. So keep in mind how you want the project's url to read. This example would be deployed as projects.sun-sentinel.com/MyApp
Switch into the project's root folder and install dependencies with yarn install
After dependencies are installed, run yarn start
. This will kickstart the development server on http://localhost:3000.
Once you're finished, build out the project for production with run
yarn build
Starterkit generates a static project that will go onto our Amazon S3 bucket at projects.sun-sentinel.com.
We automate our deployment process with the gulp-awspublish library, which takes the 'public' folder and uploads it to the S3 bucket.
First, make sure you have the Sun Sentinel's AWS credentials in your environment variables.
Then, once the project is built, run yarn deploy
Feature | Packages Used |
---|---|
CSS | Sass (Libsass via node-sass), Autoprefixer, CSSNano, Source Maps |
JavaScript | Babel, webpack 3 |
HTML | Nunjucks, gulp-data |
Live Updating | Browsersync, webpack Dev Middleware, webpack Hot Middleware |
Production Builds | CSS is minified, JS is compressed and optimized with various webpack plugins, filename md5 hashing (reving), file size reporting for long-term file caching |
This project is based off of Blendid, but includes a few other libraries like: