Skip to content

Commit b7aced9

Browse files
committed
SCSS Bootstrap compiler
1 parent 7e7528f commit b7aced9

File tree

8 files changed

+333
-14
lines changed

8 files changed

+333
-14
lines changed

INSTALL.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ go get github.com/oftn-oswg/zerodrop
1212
cd $GOPATH/src/oftn-oswg/zerodrop
1313

1414
yarn install # or npm install
15+
yarn run css # or npm run css
1516
yarn run dist # or npm run dist
1617

1718
# EDIT config.yml to your liking.

package.json

+2-6
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,10 @@
99
"private": true,
1010
"devDependencies": {
1111
"@types/jquery": "^3.3.2",
12-
"autoprefixer": "^8.5.0",
1312
"bootstrap": "^4.1.1",
14-
"css-loader": "^0.28.11",
1513
"jquery": "^3.3.1",
1614
"node-sass": "^4.9.0",
1715
"popper.js": "^1.14.3",
18-
"postcss-loader": "^2.1.5",
19-
"sass-loader": "^7.0.1",
20-
"style-loader": "^0.21.0",
2116
"ts-loader": "^4.3.0",
2217
"typescript": "^2.8.3",
2318
"uglifyjs-webpack-plugin": "^1.2.5",
@@ -26,6 +21,7 @@
2621
},
2722
"scripts": {
2823
"build": "webpack --mode development",
29-
"dist": "webpack --mode production"
24+
"dist": "webpack --mode production",
25+
"css": "node-sass --output-style compressed ./scss/zerodrop.scss ./static/zerodrop.css"
3026
}
3127
}

scss/zerodrop.scss

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@import "node_modules/bootstrap/scss/bootstrap";

static/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# These files are generated with webpack
22
/zerodrop.js
33
/zerodrop.js.map
4+
/zerodrop.css

templates/header.tmpl

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
77
<meta http-equiv="X-UA-Compatible" content="ie=edge">
88
<title>{{$.Title}}</title>
9-
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4"
10-
crossorigin="anonymous" />
9+
<link rel="stylesheet" href="{{$.Config.Base}}admin/static/zerodrop.css" type="text/css" />
1110
</head>
1211

1312
<body>
File renamed without changes.

webpack.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const webpack = require('webpack');
33
const uglify = require('uglifyjs-webpack-plugin');
44

55
module.exports = {
6-
entry: path.join(__dirname, 'typescript/Zerodrop.ts'),
6+
entry: path.join(__dirname, 'ts/zerodrop.ts'),
77
output: {
88
filename: 'zerodrop.js',
99
path: path.join(__dirname, 'static')

0 commit comments

Comments
 (0)