Noscript project generator for Yeoman
A noscript project generator for Yeoman.
npm install -g yo grunt-cli bower
Install the generator:
npm install -g generator-noscript
Make a new directory and
cd into it:
mkdir new-ns-project && cd $_
yo noscript and answer some prompts. After the dependencieas are
grunt build to assemble the project or
grunt server to
start local development server.
List of available generators:
Note: Generators are supposed to be run from the root directory of your app.
Generates most of the boilerplate code you need to get started with a noscript app. Sets up the following folder structure:
/app Folder, containing your front-end code:/views - ns.Views/models - ns.Models/layouts - ns.Layouts/actions - ns.Actions/components - non-ns code, e.g. widgets or helpersroutes.js - route definitionsinit.js - initialization code/server Folder, containing back-end, express powered code:/views - yate templates/models - model retrieval modulesserver.js - main server-side scriptmodels.js - models connectorindex.js - main application template renderer/vendor Folder, containing bower-installed dependencies/styles Project CSS written in Styluspackage.jsonbower.jsonGrunfile.js
Gruntfile comes bundled with following tasks:
grunt buildassembles the project, building templates and concatenating scripts,
grunt serverbuilds the project and starts up a local instance of express server with livereload.
The generated app will use:
ns.Model definition and pairs it with server-side model retrieval
module. Note that dasherized or underscored names are camel-cased as per
yo noscript:model sampleModel
ns.View definition with a corresponding
Yate template. Note that dasherized or
underscored names are camel-cased as per convention.
yo noscript:view sampleView
Lists views, models or layouts currently present in the project.
yo noscript:list views yo noscript:list models yo noscript:list layouts