Startup UI
A startup workflow to a FrontEnd project, compile your Less files, minify your Javascript, run tests on your code and make reports. All based on Node.Js
Easy Setup
1. If you don't have Node.js. Go to Nodejs.org and install it. 2. Clone this repositorygit clone https://github.com/luckmattos/startup-ui.git,or download it
https://github.com/luckmattos/startup-ui/archive/master.zip.
3. Open the Terminal(MacOS) or Command Prompt(Windows), make sure you are on the repository folder.
4. Install Grunt. npm install grunt. MacOS Users: Use sudo npm install grunt.
Usage - Grunt Tasks
On the Terminal or CommandPrompt(Windows) execute these tasks:
Task "grunt" or "grunt dev":
- Run this when you are developing, it will run the default task which is:
grunt watch. This will let grunt observe all js/less files for modifications and compile them on the fly.
Task "grunt build":
- Compiles "dev/less/main.less" to CSS on "dist/css/".
- Minify all .js files from "dev/" to "dist/js/".
- Minify all image files from "dev/img/" to "dist/img/".
Task "grunt test":
- Runs JsHint javascript validator.
Task "grunt report":
- Runs Plato, a javascript visual and detailed report. Reports are saved on a folder called "reports".
Customizing package.json
To build the files Grunt uses informations locate it on thepackage.json.Put your project's name, version, repository and authors to customize the output files.
Used Node Packages:
Grunt
Plugins: Watch, JsHint, Plato, Uglify, Less, Imagemin.
Folders
Dev:Development, here we put the all our assets and custom files (Javascript and Less).
Dist:
Distribution, here we put the CSS, minified JS and compiled Images.
Reports:
Javascript Reports, visual and detailed information of code lines, coverage, syntax, errors, etc.