Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
backstrap-gruntfile
Advanced tools
a great starter Gruntfile with a complete development workflow
A great starter Gruntfile with a complete development workflow.
Add this Gruntfile.coffee
to your projects, either by downloading it or copy-pasting the text. Run the following commands in your terminal to install and save Grunt and the packages used in this Gruntfile. Then use the workflow described below for kickass frontend web development!
# globally install Grunt and CoffeeScript
$ npm install -g grunt-cli coffee-script
# basic grunt tools
$ npm install --save-dev browserify coffeeify grunt load-grunt-tasks time-grunt`
# individual grunt plugins
$ npm install --save-dev grunt-browserify grunt-contrib-clean grunt-contrib-concat grunt-contrib-connect grunt-contrib-copy grunt-contrib-cssmin grunt-contrib-handlebars grunt-contrib-imagemin grunt-contrib-sass grunt-contrib-uglify grunt-contrib-watch grunt-gh-pages grunt-template grunt-usemin`
grunt build
: compile sources (Coffee, Sass, templates) from app/
to dist/
grunt dev
⇒ grunt
: compile source and launch a development server that watches changes and reloads the browsergrunt minify
: optimize and obfuscate compiled source files for production (run grunt build
first)grunt dist
: build and minify source code in dist/
, copy production assets, and launch a static production preview servergrunt deploy
: upload production source to your project's GitHub Page (http://<username>.github.io/<project>
)Generally, you'll run grunt dev
(or simply grunt
for convenience) while you develop. This command launches the development server which watches for changes to source files and recompiles and reloads intelligently.
When you're ready to deploy a new version, you'll run grunt dist
to test the compiled code. This command launches a preview server so you can interact with the compiled code. It does not watch for changes so any fixes will likely require some more grunt dev
. Once you are satisfied with your updates, you can run grunt deploy
to upload the contents of the dist/
directory to a GitHub Page.
This Grunt workflow comes with an opinionated set of web technologies.
CoffeeScript is "a little language that compiles into JavaScript." It merges the power, flexibility, and portability of JavaScript with the pure joy of developer-friendly scripting languages like Ruby and Python. It augments basic JavaScript syntax with a whitespace-sensitive syntax, Python-style comprehensions, simpler English keywords, and a useful class
structure with basic inheritance. You're going to love it.
Browserify lets you require('modules')
in the browser just like in Node, and bundles all your dependencies effortlessly. This workflow uses Browserify to perform the CoffeeScript compilation and to bundle all your source files for the client.
Sass is "the most mature, stable, and powerful professional grade CSS extension language in the world." It's a CSS pre-processor (equivalent to LESS or Stylus) with a host of powerful features and an active developer community.
Handlebars is "minimal templating on steroids." It's an incredibly simple languge for writing fast, reusable HTML templates. All your template files will be pre-compiled by Grunt and served to the browser in one simple file.
UglifyJS is a "JavaScript parser/mangler/compressor/beautifier toolkit." With the grunt-contrib-uglify plugin, it's basically a production build tool in a box, performing everything from concatenation to compression to obfuscation for both our JavaScript and our CSS. This ensures that your final compiled project is as small and fast as possible.
FAQs
a great starter Gruntfile with a complete development workflow
We found that backstrap-gruntfile demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.