One new angular and fis development kits, which integrated angular and FIS.
This project is an application skeleton for a typical AngularJS web app. You can use it to quickly bootstrap your angular webapp projects and dev environment for these projects.
To get you started you can simply clone the angular-fis-kit repository and install the dependencies:
You need git to clone the angular-fis-kit repository. You can get git from http://git-scm.com/.
We also use a number of node.js tools to initialize and test angular-fis-kit. You must have node.js and its package manager (npm) installed. You can get them from http://nodejs.org/.
Clone the angular-fis-kit repository using [git][git]:
git clone https://github.com/enimo/angular-fis-kit.git
cd angular-fis-kit/
We have preconfigured the project with a simple development web server. The simplest way to start this server is:
# open root dir
cd ./
# start the server
npm start
# dev and debug
npm run dev
#stop server if all done
npm stop
Now browse to the app at http://localhost:8080/
.
app/ --> all of the source files for the application
assets/ --> all static files, such as css, js, images
view/ --> the view1 view template and logic
app.js --> main application module
index.html --> app layout file (the main html template file of the app)
karma.conf.js --> config file for running unit tests with Karma
fis-conf.js --> config workflow with fis
dist/ --> all compiled file
dist_tmp/ --> temporary compiled file for web server debug
kit/ --> some kit shell script, e.g. start webserver, compile and debug etc.
test/ --> unit test case
Dapper/ --> a backend PHP dapper framework, for Restful API or smarty render
There are two kinds of tests in the angular-fis-kit application: Unit tests.
The angular-fis-kit app comes preconfigured with unit tests. These are written in [Jasmine][jasmine], which we run with the [Karma Test Runner][karma]. We provide a Karma configuration file to run them.
- the configuration is found at
karma.conf.js
- the unit tests are found next to the code they are testing and are named as
..._test.js
.
The easiest way to run the unit tests is to use the supplied npm script:
npm test
This script will start the Karma test runner to execute the unit tests. Moreover, Karma will sit and watch the source and test files for changes and then re-run the tests whenever any of them change. This is the recommended strategy; if your unit tests are being run every time you save a file then you receive instant feedback on any changes that break the expected code functionality.
You can also ask Karma to do a single run of the tests and then exit. This is useful if you want to check that a particular version of the code is operating as expected. The project contains a predefined script to do this:
npm run test-single-run
I'll keep polishing this app and keep adding new features. If you have any problems when using this engine, please feel free to drop me an issue or contact me:
- weibo: http://weibo.com/enimo