https://github.com/grassator/grunt-requirejs-karma-seed
Starting point for developing a web frontend component
https://github.com/grassator/grunt-requirejs-karma-seed
Last synced: over 1 year ago
JSON representation
Starting point for developing a web frontend component
- Host: GitHub
- URL: https://github.com/grassator/grunt-requirejs-karma-seed
- Owner: grassator
- License: mit
- Created: 2014-01-08T13:00:08.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-01-29T06:02:10.000Z (over 12 years ago)
- Last Synced: 2023-04-09T14:49:34.727Z (about 3 years ago)
- Language: JavaScript
- Size: 211 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Grunt + Require.js + Karma Seed Repo
This is an effort to provide good starting point for developing any kind of
frontend component, whether it is a full-size app or a small library.
## Getting Started
> Make sure you have [node](http://nodejs.com) installed.
After that, if you don't have bower, `npm install -g bower`.
Before you can start development be sure to run:
npm install
grunt bower
The above steps will download all the required dependencies to
build and run this app, such as [grunt](http://gruntjs.com) and
[requirejs](http://requirejs.org).
## Changing Directory Structure
To allow for better flexibility some of the directory structure like the name
of vendor, src and dist folders can be changed inside `paths.json` file. This
might be useful for example if you decide to use this template as a starting
point for an application or library that must conform to certain guidelines.
## Building the application
This application uses requirejs to load the various modules in
the app folder. However, upon build, all of these files are
concatenated and minified together to create a small, compressed
javascript file.
Running `grunt` by itself will run through all of the steps of
linting the javascript, building out dependencies and ultimately
creating `/dist/main.min.js` && `/dist/main.js`.
## Tests
Create tests as `test/*Spec.js` files, where you can
require your modules and test their functionality.
Tests are run using [karma](http://karma-runner.github.io/).
To run them once in [PhantomJS](http://phantomjs.org/):
grunt test