Skip to content

Commit 8731c93

Browse files
committed
Removed Ruby dependencies. Cleaned up.
1 parent 8e77a9f commit 8731c93

25 files changed

+394
-421
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
/.sass-cache
1515
/.cache
1616

17+
# Built gh-pages
18+
/gh-pages
19+
1720
# Ignore .DS_store file
1821
.DS_Store
1922

Gemfile

Lines changed: 0 additions & 14 deletions
This file was deleted.

Gemfile.lock

Lines changed: 0 additions & 120 deletions
This file was deleted.

Gruntfile.js

Lines changed: 122 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,129 @@
11
module.exports = function(grunt) {
2-
'use strict';
2+
'use strict';
33

4-
grunt.initConfig({
5-
uglify: {
6-
options: {
7-
mangle: false
8-
},
9-
my_target: {
10-
files: {
11-
'dist/timesheet.js': ['source/javascripts/timesheet.bubble.js', 'source/javascripts/timesheet.js']
12-
}
13-
}
14-
},
15-
sass: {
16-
dist: {
17-
options: {
18-
style: 'compressed'
19-
},
20-
files: {
21-
'dist/timesheet.css': 'source/stylesheets/timesheet.css.sass'
22-
}
23-
}
24-
},
25-
jshint: {
26-
all: {
27-
src: [
28-
'source/javascripts/*.js',
29-
'source/javascripts/**/*.js.erb'
30-
],
31-
options: {
32-
jshintrc: '.jshintrc'
33-
}
34-
}
35-
},
36-
simplemocha: {
37-
options: {
38-
globals: ['should'],
39-
timeout: 3000,
40-
ignoreLeaks: false,
41-
grep: '',
42-
ui: 'tdd',
43-
reporter: 'spec'
44-
},
45-
all: { src: ['test/**/*.js'] }
46-
},
47-
watch: {
48-
scripts: {
49-
files: [
50-
'.jshintrc',
51-
'Gruntfile.js',
52-
'source/**/*.js',
53-
'source/**/*.js.erb',
54-
'test/*.js',
55-
'.jshint'
56-
],
57-
tasks: ['simplemocha', 'jshint'],
58-
options: {
59-
interrupt: true,
60-
},
61-
},
62-
}
63-
});
4+
var fs = require('fs');
645

65-
// For this to work, you need to have run `npm install grunt-simple-mocha`
66-
grunt.loadNpmTasks('grunt-contrib-jshint');
67-
grunt.loadNpmTasks('grunt-contrib-watch');
68-
grunt.loadNpmTasks('grunt-simple-mocha');
6+
grunt.initConfig({
7+
uglify: {
8+
options: {
9+
mangle: false
10+
},
11+
my_target: {
12+
files: {
13+
'dist/timesheet.min.js': ['source/javascripts/timesheet.js']
14+
}
15+
}
16+
},
17+
sass: {
18+
gh: {
19+
options: {
20+
style: 'compressed'
21+
},
22+
files: {
23+
'gh-pages/styles/style.css': 'source/stylesheets/style.sass'
24+
}
25+
},
26+
dist: {
27+
options: {
28+
style: 'compressed'
29+
},
30+
files: {
31+
'dist/timesheet.min.css': 'source/stylesheets/timesheet.sass',
32+
'dist/timesheet-white.min.css': 'source/stylesheets/timesheet-white.sass'
33+
}
34+
}
35+
},
36+
jshint: {
37+
all: {
38+
src: [
39+
'source/javascripts/*.js'
40+
],
41+
options: {
42+
jshintrc: '.jshintrc'
43+
}
44+
}
45+
},
46+
simplemocha: {
47+
options: {
48+
globals: ['should'],
49+
timeout: 3000,
50+
ignoreLeaks: false,
51+
grep: '',
52+
ui: 'tdd',
53+
reporter: 'spec'
54+
},
55+
all: { src: ['test/**/*.js'] }
56+
},
57+
express: {
58+
options: {
59+
port: 8080
60+
},
61+
dev: {
62+
options: {
63+
script: __dirname + '/serve.js'
64+
}
65+
}
66+
},
67+
watch: {
68+
scripts: {
69+
files: 'source/javascripts/*.js',
70+
tasks: ['simplemocha', 'jshint', 'uglify'],
71+
options: {
72+
interrupt: true,
73+
}
74+
},
75+
styles: {
76+
files: 'source/stylesheets/*.sass',
77+
tasks: ['sass'],
78+
options: {
79+
interrupt: true,
80+
}
81+
}
82+
},
83+
haml: {
84+
gh: {
85+
files: {
86+
'gh-pages/index.html': 'source/index.haml'
87+
},
88+
options: {
89+
context: {
90+
code: fs.readFileSync(__dirname + '/source/snippets/example-date.js')
91+
}
92+
}
93+
}
94+
},
95+
copy: {
96+
gh: {
97+
files: [
98+
{expand: false, src: __dirname + '/source/javascripts/lib.js', dest: __dirname + '/gh-pages/script/lib.js'},
99+
{expand: false, src: __dirname + '/source/javascripts/main.js', dest: __dirname + '/gh-pages/script/main.js'},
100+
{expand: false, src: __dirname + '/dist/timesheet.min.js', dest: __dirname + '/gh-pages/script/timesheet.min.js'},
101+
{expand: false, src: __dirname + '/dist/timesheet.min.css', dest: __dirname + '/gh-pages/styles/timesheet.css'},
102+
{expand: false, src: __dirname + '/dist/timesheet-white.min.css', dest: __dirname + '/gh-pages/styles/timesheet-white.css'},
103+
{expand: false, src: __dirname + '/dist/timesheet.min.css.map', dest: __dirname + '/gh-pages/styles/timesheet.css.map'},
104+
{expand: false, src: __dirname + '/dist/timesheet-white.min.css.map', dest: __dirname + '/gh-pages/styles/timesheet-white.css.map'}
105+
]
106+
}
107+
}
108+
});
69109

70-
grunt.loadNpmTasks('grunt-contrib-uglify');
71-
grunt.loadNpmTasks('grunt-contrib-sass');
110+
grunt.loadNpmTasks('grunt-contrib-jshint');
111+
grunt.loadNpmTasks('grunt-contrib-watch');
112+
grunt.loadNpmTasks('grunt-simple-mocha');
72113

73-
// Default task
74-
grunt.registerTask('default', ['simplemocha', 'jshint']);
114+
grunt.loadNpmTasks('grunt-contrib-copy');
115+
116+
grunt.loadNpmTasks('grunt-contrib-uglify');
117+
grunt.loadNpmTasks('grunt-contrib-sass');
118+
119+
grunt.loadNpmTasks('grunt-express-server');
120+
121+
grunt.loadNpmTasks('grunt-haml');
122+
123+
// Default task
124+
grunt.registerTask('default', ['build']);
125+
grunt.registerTask('build', ['simplemocha', 'jshint', 'uglify', 'sass']);
126+
grunt.registerTask('server', ['express:dev', 'watch' ])
127+
grunt.registerTask('gh', ['build', 'haml:gh', 'sass:gh', 'copy:gh']);
75128

76-
// Build task
77-
grunt.registerTask('build', ['uglify', 'sass']);
78129
};

bower.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"sbstjn <[email protected]>"
77
],
88
"description": "With Timesheet.js you can easily create simple time and data sheets or timelines using HTML5, JavaScript and CSS3. Yep, it's a Vanilla JS library!",
9-
"main": ["dist/timesheet.js", "dist/timesheet.css"],
9+
"main": ["dist/timesheet.min.js", "dist/timesheet.min.css"],
1010
"moduleType": [
1111
"amd"
1212
],
@@ -29,10 +29,7 @@
2929
"tests",
3030
"screen.png",
3131
"source",
32-
"config.rb",
3332
"Gruntfile.js",
34-
"Gemfile",
35-
"Gemfile.lock",
3633
"package.json"
3734
]
3835
}

config.rb

Lines changed: 0 additions & 14 deletions
This file was deleted.

dist/timesheet-white.min.css

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/timesheet-white.min.css.map

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/timesheet.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/timesheet.css renamed to dist/timesheet.min.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)