1 |
|
2 | module.exports = function(grunt) {
|
3 | 'use strict';
|
4 | grunt.initConfig({
|
5 | pkg: '<json:package.json>',
|
6 | lint: {
|
7 | all: ['./grunt.js', './dist/*.js', './test/test.js']
|
8 | },
|
9 | jshint: {
|
10 | options: {
|
11 | curly: true,
|
12 | eqeqeq: true,
|
13 | immed: true,
|
14 | latedef: true,
|
15 | newcap: true,
|
16 | nonew: true,
|
17 | noarg: true,
|
18 | sub: true,
|
19 | undef: true,
|
20 | unused: true,
|
21 | eqnull: true,
|
22 | browser: true,
|
23 | strict: true,
|
24 | boss: false
|
25 | }
|
26 | },
|
27 | concat: {
|
28 | applitude: {
|
29 | src: ['node_modules/applitude/dist/applitude.bundle.js'],
|
30 | dest: 'lib/applitude.bundle.js'
|
31 | },
|
32 | browser: {
|
33 | src: ['src/head.js', 'src/browser-fingerprint.js', 'src/footer.js'],
|
34 | dest: 'dist/browser-cuid.js'
|
35 | },
|
36 | node: {
|
37 | src: ['src/head.js', 'src/node-fingerprint.js', 'src/footer.js'],
|
38 | dest: 'dist/node-cuid.js'
|
39 | }
|
40 | },
|
41 | qunit: {
|
42 | applitude: ['test/applitude-cuid-test.html'],
|
43 | browser: ['test/browser-cuid-test.html']
|
44 | },
|
45 | test: {
|
46 | "node-cuid": ['test/node-cuid-test.js']
|
47 | }
|
48 | });
|
49 | grunt.registerTask('testall', 'qunit test');
|
50 | grunt.registerTask('default', 'concat lint');
|
51 | grunt.registerTask('install', 'concat');
|
52 | };
|