diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..ce9e8c7 --- /dev/null +++ b/.npmignore @@ -0,0 +1,7 @@ +demo +src +test +bower.json +Gruntfile.js +karma-e2e.conf.js +karma.conf.js diff --git a/README.md b/README.md index b7584e9..9b4d9f6 100644 --- a/README.md +++ b/README.md @@ -5,10 +5,16 @@ AngularJS directive for the [JustGage](http://justgage.com/) gauge. ## Installation +### Bower ```shell $ bower install angular-gage ``` +### NPM +```shell +$ npm install angular-gage +``` + ## Usage The directive tag is `justgage`, but you can also use it as an attribute or as a class name. `angular-gage` implements @@ -100,4 +106,4 @@ Francesco Pontillo () See the License for the specific language governing permissions and limitations under the License. -``` \ No newline at end of file +``` diff --git a/index.js b/index.js new file mode 100644 index 0000000..4bc7f8d --- /dev/null +++ b/index.js @@ -0,0 +1,2 @@ +require('./dist/angular-gage'); +module.exports = 'frapontillo.gage'; diff --git a/karma.conf.js b/karma.conf.js index dfe5bdb..7c59de7 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -19,6 +19,10 @@ module.exports = function(config) { 'test/spec/**/*.js' ], + preprocessors: { + 'test/spec/justgageSpec.js': ['webpack'] + }, + // list of files / patterns to exclude exclude: [], diff --git a/package.json b/package.json index 401339b..cf0e158 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,12 @@ "name": "angular-gage", "version": "0.1.0", "dependencies": {}, + "peerDependencies": { + "angular": ">=1.3.0", + "raphael": "^2.1.4", + "justgage": "^1.1.0" + }, + "browser": "index.js", "devDependencies": { "grunt": "~0.4.1", "grunt-autoprefixer": "~0.4.0", @@ -18,21 +24,23 @@ "grunt-contrib-uglify": "~0.2.0", "grunt-contrib-watch": "~0.5.2", "grunt-google-cdn": "~0.2.0", + "grunt-karma": "~0.12.1", "grunt-newer": "~0.6.1", "grunt-ngmin": "~0.0.2", "grunt-rev": "~0.1.0", "grunt-svgmin": "~0.2.0", "grunt-usemin": "~2.0.0", "jshint-stylish": "~0.1.3", - "load-grunt-tasks": "~0.4.0", - "time-grunt": "~0.2.1", - "karma-ng-scenario": "^0.1.0", - "grunt-karma": "^0.8.3", - "karma": "^0.12.16", - "karma-ng-html2js-preprocessor": "^0.1.0", + "karma": "~0.13.21", + "karma-chrome-launcher": "^0.1.3", "karma-jasmine": "^0.1.5", + "karma-ng-html2js-preprocessor": "^0.1.0", + "karma-ng-scenario": "^0.1.0", "karma-phantomjs-launcher": "^0.1.4", - "karma-chrome-launcher": "^0.1.3" + "karma-webpack": "~1.7.0", + "load-grunt-tasks": "~0.4.0", + "time-grunt": "~0.2.1", + "webpack": "~1.12.14" }, "engines": { "node": ">=0.10.0" diff --git a/test/spec/justgageSpec.js b/test/spec/justgageSpec.js new file mode 100644 index 0000000..88a3d7e --- /dev/null +++ b/test/spec/justgageSpec.js @@ -0,0 +1,11 @@ +'use strict'; + +describe('Module: justgage', function () { + + it('should export the module name', function () { + + expect(require('./../../index')).toEqual('frapontillo.gage'); + + }); + +});