The Yeoman generator for OneJS will do all the heavy lifting so you can stay focused on building amazing tools!
- Install generator-onejs
npm install -g generator-onejs
- Make a new directory, and cd into it
mkdir my-onejs-project && cd $_
- Run the generator and follow the prompts to create a new "app"
yo onejs
- Run the initial build
gulp
- Spin up a server/browser with watch/livereload support, which will auto build your stuff and refresh your page:
gulp watch
You can use yo onejs
to follow prompts to scaffold anything that we have a generator for. Alternately, power users may want to skip the prompts in order to scaffold with just command line arguments.
Use this as a starting point for a brand new app. Scaffolds an app root, a controller with example data, and test framework.
yo onejs --app --name=MyAppName
Generates a the control source with the name passed in and a test stub.
yo onejs --control --name=FavoritesPane
Sets up a Karma test runner with Mocha and Chai library and a PhantomJS browser to run tests in. Already included in the app scaffolding, so only run this if you didn't use the app generator to create your project.
yo onejs --testFramework