Perfectionist generator that scaffolds out different types of Frontend apps
Perfectionist generator that scaffolds out different types of Frontend application
Installation
You need to have NodeJS & Yeoman installed on your machine
npm install -g yo
Install smacss generator
npm install --global generator-smacss
Creating project
Run yo smacss
Answer simple questions in terminal
Generator will automatically try to install dependencies in your project folder.
You got your installation successfull ‘You are lucky’, run the server following the instruction in next section.
In case you got any error you may not have admin rights
sudo bower install & npm install
followed by your machine password in Mac/Linux environment; Windows user try running as administratorRun your project
At this stage your project is setup and dependencies are installed, It’s showtime!
gulp
to run the server, and you are good to start your development.Your directory structure will look like this
Terminal commands to speed up repetitive tasks you do in projects. Simple app idea is to maintain as minimal as possible; so quick commands won’t work.
Clean Remove all files from your build folder
gulp clean
Zip Compress you app & save in zip
folder with timestamp for quick sharing
gulp zip
Controller Creates a controller in app/js/controllers
yo smacss:controller <name>
Service Creates a service in app/js/services
yo smacss:service <name>
Directive Creates a directive in app/js/directives
yo smacss:directive <name>
Filter Creates a filter in app/js/filters
yo smacss:filter <name>
Generator Smacss comes with development and producution modes. In default it runs in development mode.
You can switch to production mode using the following command
gulp prod
Tip: While installation additional bower components to your project, make sure your save your new component
in your bower.json
file by installing like below
bower install <bower-component-name> --save
So that generator will automatically include your new bower component to bower.js
file for usage
You can find the detailed release notes here
--skip-welcome-message
Skips the welcome message and take you to question.--skip-install
Skips the automatic execution of bower and npm after scaffolding has finished.Contribution would be of great help to create a solid generator for frontend projects
Active Contributors