Skip to content

Commit 947d350

Browse files
Merge pull request #5 from CastleCSS/develop
Release 1.3.0
2 parents 9fa7e26 + b99630d commit 947d350

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+11419
-13003
lines changed

.gitignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
*.log
2-
thumbs.db
3-
node_modules
1+
*.log
2+
thumbs.db
3+
node_modules
4+
node_modules/

.npmignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*.log
2-
thumbs.db
3-
1+
*.log
2+
thumbs.db
3+
44
node_modules

Gruntfile.js

Lines changed: 129 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,129 @@
1-
/* Grunt Task configuration */
2-
module.exports = function(grunt) {
3-
4-
/* using jit-grunt for automatically loading all required plugins */
5-
require('jit-grunt')(grunt);
6-
7-
grunt.initConfig({
8-
pkg: grunt.file.readJSON('package.json'),
9-
10-
// Compile Sass to CSS and produce SoureMaps;
11-
sass: {
12-
options: {
13-
sourceMap: true,
14-
outputStyle: 'uncompressed'
15-
},
16-
files: {
17-
src: 'scss/main.scss',
18-
dest: 'dist/css/styles.min.css',
19-
ext: '.css'
20-
}
21-
},
22-
23-
// PostCSS for adding prefixers and setting rem to pixels;
24-
postcss: {
25-
dist: {
26-
src: 'dist/css/styles.min.css'
27-
28-
},
29-
options: {
30-
// Rewrite and save sourcemap as seperate file
31-
map: {
32-
annotation: 'styles/'
33-
},
34-
processors: [
35-
// add fallbacks for rem units
36-
require('pixrem')({
37-
atrules: true
38-
}),
39-
// add vendor prefixes
40-
require('autoprefixer')({ browsers: 'iOS >= 7, last 2 versions, ie > 7' }),
41-
// minify the result
42-
require('cssnano')()
43-
]
44-
},
45-
},
46-
47-
watch: {
48-
scss: {
49-
files: ['scss/**/*.scss', 'node_modules/**/*.scss' ],
50-
tasks: ['sass', 'postcss'],
51-
options: {
52-
spawn: false,
53-
},
54-
},
55-
nunjucks: {
56-
files: 'views/**/*.html',
57-
tasks: ['nunjucks'],
58-
options: {
59-
spawn: false,
60-
},
61-
}
62-
},
63-
64-
nunjucks: {
65-
render: {
66-
options: {
67-
paths: ['views'],
68-
trimBlock: true,
69-
lstripBlocks: true,
70-
data: grunt.file.readJSON('templates-data.json')
71-
},
72-
files: [
73-
{
74-
expand: true,
75-
cwd: "views/",
76-
src: "*.html",
77-
dest: "dist/",
78-
ext: ".html"
79-
}
80-
]
81-
}
82-
},
83-
84-
85-
});
86-
87-
grunt.loadNpmTasks('grunt-nunjucks-2-html');
88-
89-
/*
90-
* Grunt tasks
91-
* Run with grunt or grunt <command> in terminal
92-
*/
93-
grunt.registerTask('default', 'run');
94-
grunt.registerTask('run',
95-
[
96-
'nunjucks',
97-
'sass',
98-
'postcss',
99-
'watch'
100-
]
101-
);
102-
grunt.registerTask('create_css',
103-
[
104-
'sass',
105-
'postcss'
106-
]
107-
);
108-
grunt.registerTask('create_html',
109-
[
110-
'nunjucks'
111-
]
112-
);
113-
};
1+
/* Grunt Task configuration */
2+
module.exports = function(grunt) {
3+
4+
/* using jit-grunt for automatically loading all required plugins */
5+
require('jit-grunt')(grunt);
6+
7+
grunt.initConfig({
8+
pkg: grunt.file.readJSON('package.json'),
9+
10+
// Compile Sass to CSS and produce SoureMaps;
11+
sass: {
12+
options: {
13+
sourceMap: true,
14+
outputStyle: 'uncompressed'
15+
},
16+
files: {
17+
src: 'scss/main.scss',
18+
dest: 'dist/css/styles.min.css',
19+
ext: '.css'
20+
}
21+
},
22+
23+
// PostCSS for adding prefixers and setting rem to pixels;
24+
postcss: {
25+
dist: {
26+
src: 'dist/css/styles.min.css'
27+
28+
},
29+
options: {
30+
// Rewrite and save sourcemap as seperate file
31+
map: {
32+
annotation: 'styles/'
33+
},
34+
processors: [
35+
// add fallbacks for rem units
36+
require('pixrem')({
37+
atrules: true
38+
}),
39+
// add vendor prefixes
40+
require('autoprefixer')({ browsers: 'iOS >= 7, last 2 versions, ie > 7' }),
41+
// minify the result
42+
require('cssnano')()
43+
]
44+
},
45+
},
46+
47+
watch: {
48+
scss: {
49+
files: ['scss/**/*.scss', 'node_modules/**/*.scss' ],
50+
tasks: ['sass', 'postcss'],
51+
options: {
52+
spawn: false,
53+
},
54+
},
55+
nunjucks: {
56+
files: 'views/**/*.html',
57+
tasks: ['nunjucks'],
58+
options: {
59+
spawn: false,
60+
},
61+
}
62+
},
63+
64+
nunjucks: {
65+
render: {
66+
options: {
67+
paths: ['views'],
68+
trimBlock: true,
69+
lstripBlocks: true,
70+
data: grunt.file.readJSON('templates-data.json')
71+
},
72+
files: [
73+
{
74+
expand: true,
75+
cwd: "views/",
76+
src: "*.html",
77+
dest: "dist/",
78+
ext: ".html"
79+
}
80+
]
81+
}
82+
},
83+
browserSync: {
84+
dev: {
85+
bsFiles: {
86+
src : [
87+
'./dist/**/*.css',
88+
'./dist/**/*.html',
89+
]
90+
},
91+
options: {
92+
watchTask: true,
93+
server: './dist/'
94+
}
95+
}
96+
97+
}
98+
99+
100+
});
101+
102+
grunt.loadNpmTasks('grunt-nunjucks-2-html');
103+
104+
/*
105+
* Grunt tasks
106+
* Run with grunt or grunt <command> in terminal
107+
*/
108+
grunt.registerTask('default', 'run');
109+
grunt.registerTask('run',
110+
[
111+
'nunjucks',
112+
'sass',
113+
'postcss',
114+
'browserSync',
115+
'watch'
116+
]
117+
);
118+
grunt.registerTask('create_css',
119+
[
120+
'sass',
121+
'postcss'
122+
]
123+
);
124+
grunt.registerTask('create_html',
125+
[
126+
'nunjucks'
127+
]
128+
);
129+
};

LICENSE

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
MIT License
2-
3-
Copyright (c) 2016 De Nieuwe Zaak
4-
5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
11-
12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
14-
15-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
1+
MIT License
2+
3+
Copyright (c) 2016 De Nieuwe Zaak
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,28 @@
1-
# CastleCSS documentation
2-
![CastleCSS logo @CastleCss.com](https://www.doordarius.nl/castlecss-logo-250.png)
3-
4-
## CastleCSS Framework
5-
Sourcecode for www.castlecss.com and the documentation for [CastleCSS](https://github.com/CastleCSS/castlecss)
6-
7-
## How to install
8-
- Download or clone this package
9-
- Look in the dist/ folder or build if yourself with GruntJS in your terminal: ```npm install``` + ```grunt```
10-
11-
## Roadmap
12-
We're currently working hard on making the CastleCSS expansions and improvements. CastleCSS is made to serve as lightweight basis for tailor made software but we do want to give you the option to install a few modules to make your life easier.
13-
14-
Please see the [ROADMAP.MD](https://github.com/CastleCSS/castlecss/blob/master/ROADMAP.md) for our current plans for the future.
15-
16-
## Contributing
17-
Want to contribute? We'd love your help, please take a look at the roadmap or submit new suggestions.
1+
# CastleCSS documentation
2+
![CastleCSS logo @CastleCss.com](https://www.doordarius.nl/castlecss-logo-250.png)
3+
4+
## CastleCSS Framework
5+
Sourcecode for www.castlecss.com and the documentation for [CastleCSS](https://github.com/CastleCSS/castlecss)
6+
7+
## How to install
8+
- Download or clone this package
9+
- Install the project: ```npm install```
10+
11+
## Build and run automatically
12+
- Start the project with: ```npm run start```
13+
14+
This will automatically start a browserSync server.<br />
15+
The project will watch for changes in your scss and html files in your /views and /scss folder and automatically reload
16+
17+
## Build and run manually
18+
- Build the project: ```npm run create_all```
19+
20+
You can now see the project in dist folder, open a .html page in your browser
21+
22+
## Roadmap
23+
We're currently working hard on making the CastleCSS expansions and improvements. CastleCSS is made to serve as lightweight basis for tailor made software but we do want to give you the option to install a few modules to make your life easier.
24+
25+
Please see the [ROADMAP.MD](https://github.com/CastleCSS/castlecss/blob/master/ROADMAP.md) for our current plans for the future.
26+
27+
## Contributing
28+
Want to contribute? We'd love your help, please take a look at the roadmap or submit new suggestions.

dist/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
*.html
2+
**/*.html
3+
**/*.css
4+
**/*.map
5+
**/scripts.dist.js
6+
**/scripts.min.js
7+
linters

0 commit comments

Comments
 (0)