clean project
This commit is contained in:
parent
0510feaa28
commit
5a80bb7722
@ -1,8 +0,0 @@
|
|||||||
<IfModule mod_rewrite.c>
|
|
||||||
RewriteEngine On
|
|
||||||
RewriteBase /
|
|
||||||
RewriteRule ^index\.html$ - [L]
|
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
|
||||||
RewriteRule . /index.html [L]
|
|
||||||
</IfModule>
|
|
36
Gruntfile.js
36
Gruntfile.js
@ -1,36 +0,0 @@
|
|||||||
/*global module:false*/
|
|
||||||
module.exports = function(grunt) {
|
|
||||||
|
|
||||||
// Project configuration.
|
|
||||||
grunt.initConfig({
|
|
||||||
// Metadata.
|
|
||||||
pkg: grunt.file.readJSON('package.json'),
|
|
||||||
|
|
||||||
// Task configuration.
|
|
||||||
sass: {
|
|
||||||
options: {
|
|
||||||
sourceMap: true
|
|
||||||
},
|
|
||||||
dist: {
|
|
||||||
files: {
|
|
||||||
'dist/css/<%= pkg.name %>.css': 'src/scss/main.scss'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
watch: {
|
|
||||||
files: ['src/scss/**/*.scss'],
|
|
||||||
tasks: ['sass'],
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// These plugins provide necessary tasks.
|
|
||||||
//grunt.loadNpmTasks('grunt-contrib-concat');
|
|
||||||
grunt.loadNpmTasks('grunt-sass');
|
|
||||||
//grunt.loadNpmTasks('grunt-contrib-uglify');
|
|
||||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
|
||||||
|
|
||||||
// Default task.
|
|
||||||
grunt.registerTask('default', ['sass']);
|
|
||||||
|
|
||||||
};
|
|
34
Makefile
34
Makefile
@ -1,21 +1,35 @@
|
|||||||
default: install
|
default: build
|
||||||
|
|
||||||
config.pug:
|
config.pug:
|
||||||
cp config-sample.pug config.pug
|
cp config-sample.pug config.pug
|
||||||
|
|
||||||
dist/css/hd-app.css: src/scss/main.scss
|
node_modules:
|
||||||
npx grunt sass
|
|
||||||
|
|
||||||
install:
|
|
||||||
git submodule update --init --recursive
|
|
||||||
npm install
|
npm install
|
||||||
|
|
||||||
build: config.pug
|
install: node_modules
|
||||||
npx grunt sass
|
git submodule update --init --recursive
|
||||||
npx pug --pretty -p index.pug < index.pug > index.html
|
|
||||||
|
dist/css/hd-app.css: $(wildcard src/scss/*.scss)
|
||||||
|
npx node-sass src/scss/main.scss dist/css/hd-app.css --source-map true
|
||||||
|
|
||||||
|
index.html: config.pug index.pug $(wildcard src/html/*.pug)
|
||||||
|
npx pug --pretty index.pug
|
||||||
|
|
||||||
|
build: index.html dist/css/hd-app.css
|
||||||
|
|
||||||
|
build-prod: index.html
|
||||||
|
npx node-sass src/scss/main.scss dist/css/hd-app.css --output-style compressed
|
||||||
|
|
||||||
|
watch:
|
||||||
|
@echo 'watching for change'
|
||||||
|
@echo 'press ctrl+C to stop'
|
||||||
|
@while true; do \
|
||||||
|
make build --silent; \
|
||||||
|
sleep 0.5; \
|
||||||
|
done
|
||||||
|
|
||||||
serve: dist/css/hd-app.css
|
serve: dist/css/hd-app.css
|
||||||
php -S 127.0.0.1:8080 router.php
|
php -S 127.0.0.1:8080 router.php
|
||||||
|
|
||||||
|
|
||||||
.PHONY: default install build serve
|
.PHONY: default install build build-prod watch serve
|
||||||
|
@ -9,11 +9,16 @@ clone then:
|
|||||||
|
|
||||||
## Build
|
## Build
|
||||||
|
|
||||||
Compile sass & pug
|
Compile html & css:
|
||||||
|
|
||||||
* `make build`
|
* `make build`
|
||||||
|
|
||||||
|
or compile html & css on change:
|
||||||
|
|
||||||
|
* `make watch`
|
||||||
|
|
||||||
## Run server
|
## Run server
|
||||||
|
|
||||||
require PHP
|
require PHP
|
||||||
|
|
||||||
* `make serve`
|
* `make serve`
|
||||||
|
2827
package-lock.json
generated
2827
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -5,12 +5,7 @@
|
|||||||
"node": ">= 0.10.0"
|
"node": ">= 0.10.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"grunt": "~0.4.5",
|
"node-sass": "^4.9.3",
|
||||||
"grunt-contrib-concat": "~0.4.0",
|
|
||||||
"grunt-contrib-jshint": "~0.10.0",
|
|
||||||
"grunt-contrib-uglify": "~0.5.0",
|
|
||||||
"grunt-contrib-watch": "~0.6.1",
|
|
||||||
"grunt-sass": "^2.1.0",
|
|
||||||
"pug-cli": "^1.0.0-alpha6"
|
"pug-cli": "^1.0.0-alpha6"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
Loading…
Reference in New Issue
Block a user