Skip to content

Commit d72d1b8

Browse files
Added a browserSync server!
Added npm run start command Edited readme to explain new browserSync server and npm scripts
1 parent d893cec commit d72d1b8

File tree

4 files changed

+1116
-11
lines changed

4 files changed

+1116
-11
lines changed

Gruntfile.js

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,21 @@ module.exports = function(grunt) {
8080
]
8181
}
8282
},
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+
}
8398

8499

85100
});
@@ -93,10 +108,11 @@ module.exports = function(grunt) {
93108
grunt.registerTask('default', 'run');
94109
grunt.registerTask('run',
95110
[
96-
'nunjucks',
97-
'sass',
98-
'postcss',
99-
'watch'
111+
'nunjucks',
112+
'sass',
113+
'postcss',
114+
'browserSync',
115+
'watch'
100116
]
101117
);
102118
grunt.registerTask('create_css',

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,17 @@ Sourcecode for www.castlecss.com and the documentation for [CastleCSS](https://g
77
## How to install
88
- Download or clone this package
99
- Install the project: ```npm install```
10-
- Build the project with: ```npm run build_all```
11-
- You can now see the project in dist folder, open a .html page in your browser
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 build_all```
19+
20+
You can now see the project in dist folder, open a .html page in your browser
1221

1322
## Roadmap
1423
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.

0 commit comments

Comments
 (0)