Skip to content

Commit 50526b4

Browse files
committed
Added Grunt tast for building timesheet js and css
1 parent 80ea0e5 commit 50526b4

File tree

7 files changed

+123
-97
lines changed

7 files changed

+123
-97
lines changed

Gruntfile.js

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,26 @@ module.exports = function(grunt) {
22
'use strict';
33

44
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+
},
525
jshint: {
626
all: {
727
src: [
@@ -47,6 +67,12 @@ module.exports = function(grunt) {
4767
grunt.loadNpmTasks('grunt-contrib-watch');
4868
grunt.loadNpmTasks('grunt-simple-mocha');
4969

50-
// Add a default task. This is optional, of course :)
51-
grunt.registerTask('default', ['simplemocha', 'jshint', 'watch']);
70+
grunt.loadNpmTasks('grunt-contrib-uglify');
71+
grunt.loadNpmTasks('grunt-contrib-sass');
72+
73+
// Default task
74+
grunt.registerTask('default', ['simplemocha', 'jshint']);
75+
76+
// Build task
77+
grunt.registerTask('build', ['uglify', 'sass']);
5278
};

dist/timesheet.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.

dist/timesheet.js

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

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "mm-grunt-sass-haml",
2+
"name": "timesheet.js",
33
"version": "0.0.1",
44
"description": "Middleman, Grunt, JSHint, SASS, HAML",
55
"author": "semu",
@@ -9,6 +9,8 @@
99
"grunt-jslint": "~1.1.1",
1010
"grunt-contrib-jshint": "~0.7.2",
1111
"grunt-contrib-watch": "^0.6.1",
12-
"grunt-simple-mocha": "^0.4.0"
12+
"grunt-simple-mocha": "^0.4.0",
13+
"grunt-contrib-uglify": "^0.4.0",
14+
"grunt-contrib-sass": "^0.7.3"
1315
}
1416
}

source/layouts/layout.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
= stylesheet_link_tag 'all.css'
1313
= yield_content :head
1414
%body{ :class => page_classes }
15-
%span <a href="https://github.com/semu"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/a6677b08c955af8400f44c6298f40e7d19cc5b2d/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677261795f3664366436642e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png"></a>
15+
%span <a hrefhttps://github.com/semu/timesheet.js"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/a6677b08c955af8400f44c6298f40e7d19cc5b2d/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677261795f3664366436642e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png"></a>
1616
#container
1717
= yield

source/stylesheets/all.css.sass

Lines changed: 1 addition & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -86,95 +86,4 @@ code
8686
code, pre
8787
text-align: left
8888

89-
#timesheet
90-
width: 720px
91-
height: 292px
92-
margin: 0 auto
93-
94-
.timesheet
95-
border-top: 1px solid rgba(250, 250, 250, 0.5)
96-
background-color: rgba(51, 51, 51, 1)
97-
position: relative
98-
99-
.scale
100-
height: 100%
101-
position: absolute
102-
top: 0
103-
left: 0
104-
float: left
105-
106-
section
107-
float: left
108-
width: 59px
109-
text-align: center
110-
color: rgba(250, 250, 250, 0.8)
111-
font-family: 'Signika Negative'
112-
font-size: 13px
113-
line-height: 24px
114-
font-weight: lighter
115-
border-left: 1px dashed rgba(250, 250, 250, 0.2)
116-
height: 100%
117-
118-
// &:last-child
119-
border-right: 1px dashed rgba(250, 250, 250, 0.3)
120-
121-
.data
122-
margin: 28px 0 0 0
123-
padding: 0
124-
text-align: left
125-
list-style-type: none
126-
color: rgba(250, 250, 250, 0.8)
127-
font-family: 'Signika Negative'
128-
font-size: 13px
129-
overflow: hidden
130-
131-
li
132-
// background-color: rgba(251, 251, 251, 0.1)
133-
margin: 0 0 3px 0
134-
line-height: 22px
135-
height: 21px
136-
display: block
137-
cursor: pointer
138-
clear: both
139-
position: relative
140-
white-space: nowrap
141-
142-
&:hover
143-
// background-color: rgba(251, 251, 251, 0.1)
144-
.bubble
145-
opacity: 1
146-
147-
.date
148-
color: rgba(181, 181, 181, 1)
149-
font-size: 14px
150-
151-
.label
152-
font-weight: lighter
153-
font-size: 14px
154-
padding-left: 5px
155-
line-height: 21px
156-
color: rgba(151, 151, 150, 1)
157-
white-space: nowrap
158-
159-
.bubble
160-
width: 24px
161-
height: 7px
162-
background-color: red
163-
display: block
164-
float: left
165-
position: relative
166-
top: 7px
167-
border-radius: 4px
168-
margin: 0 10px 0 0
169-
opacity: 0.7
170-
171-
.bubble-default
172-
background-color: rgba(243, 85, 46, 1)
173-
.bubble-lorem
174-
background-color: rgba(136, 195, 58, 1)
175-
.bubble-ipsum
176-
background-color: rgba(67, 106, 224, 1)
177-
.bubble-dolor
178-
background-color: rgba(244, 210, 52, 1)
179-
.bubble-set
180-
background-color: rgba(112, 125, 134, 1)
89+
@import 'timesheet'

source/stylesheets/timesheet.css.sass

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
#timesheet
2+
width: 720px
3+
height: 292px
4+
margin: 0 auto
5+
6+
.timesheet
7+
border-top: 1px solid rgba(250, 250, 250, 0.5)
8+
background-color: rgba(51, 51, 51, 1)
9+
position: relative
10+
11+
.scale
12+
height: 100%
13+
position: absolute
14+
top: 0
15+
left: 0
16+
float: left
17+
18+
section
19+
float: left
20+
width: 59px
21+
text-align: center
22+
color: rgba(250, 250, 250, 0.8)
23+
font-family: 'Signika Negative'
24+
font-size: 13px
25+
line-height: 24px
26+
font-weight: lighter
27+
border-left: 1px dashed rgba(250, 250, 250, 0.2)
28+
height: 100%
29+
30+
.data
31+
margin: 28px 0 0 0
32+
padding: 0
33+
text-align: left
34+
list-style-type: none
35+
color: rgba(250, 250, 250, 0.8)
36+
font-family: 'Signika Negative'
37+
font-size: 13px
38+
overflow: hidden
39+
40+
li
41+
margin: 0 0 3px 0
42+
line-height: 22px
43+
height: 21px
44+
display: block
45+
cursor: pointer
46+
clear: both
47+
position: relative
48+
white-space: nowrap
49+
50+
&:hover
51+
.bubble
52+
opacity: 1
53+
54+
.date
55+
color: rgba(181, 181, 181, 1)
56+
font-size: 14px
57+
58+
.label
59+
font-weight: lighter
60+
font-size: 14px
61+
padding-left: 5px
62+
line-height: 21px
63+
color: rgba(151, 151, 150, 1)
64+
white-space: nowrap
65+
66+
.bubble
67+
width: 24px
68+
height: 7px
69+
background-color: red
70+
display: block
71+
float: left
72+
position: relative
73+
top: 7px
74+
border-radius: 4px
75+
margin: 0 10px 0 0
76+
opacity: 0.7
77+
78+
.bubble-default
79+
background-color: rgba(243, 85, 46, 1)
80+
.bubble-lorem
81+
background-color: rgba(136, 195, 58, 1)
82+
.bubble-ipsum
83+
background-color: rgba(67, 106, 224, 1)
84+
.bubble-dolor
85+
background-color: rgba(244, 210, 52, 1)
86+
.bubble-set
87+
background-color: rgba(112, 125, 134, 1)

0 commit comments

Comments
 (0)