Skip to content

Commit c6eeb0f

Browse files
committed
Init scss-bootstrap4-starter.
1 parent c216371 commit c6eeb0f

File tree

8 files changed

+158
-8
lines changed

8 files changed

+158
-8
lines changed

.github/workflows/ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,40 @@
11
name: CI
22
on: [push]
33
jobs:
4+
scss-bootstrap4-starter:
5+
strategy:
6+
matrix:
7+
os: [ubuntu-latest]
8+
nodejs-version: [12]
9+
python-version: [3.8]
10+
runs-on: ${{ matrix.os }}
11+
name: scss-bootstrap4-starter (${{ matrix.os }} OS, python ${{ matrix.python-version }}, NodeJS ${{ matrix.nodejs-version }})
12+
steps:
13+
- name: Set up NodeJS ${{ matrix.nodejs-version }}
14+
uses: actions/setup-node@v1
15+
with:
16+
node-version: ${{ matrix.nodejs-version }}
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v1
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
- name: Install / upgrade pip
22+
run: python -m pip install --upgrade pip setuptools
23+
- name: Install HTTPie
24+
run: pip install --upgrade httpie
25+
- name: Install required npm packages globally
26+
run: npm install -g wait-port
27+
- name: Clone git project
28+
uses: actions/checkout@v2
29+
- name: Install, run, wait and test
30+
shell: bash
31+
run: |
32+
cd $GITHUB_WORKSPACE/scss-bootstrap4-starter && npm i
33+
cd $GITHUB_WORKSPACE/scss-bootstrap4-starter && npm start
34+
cd $GITHUB_WORKSPACE/scss-bootstrap4-starter && npm run logs &
35+
wait-port 1234
36+
http get :1234
37+
cd $GITHUB_WORKSPACE/scss-bootstrap4-starter && npm stop
438
css-gradient-based-app-step-2:
539
strategy:
640
matrix:

.travis.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -135,31 +135,36 @@ jobs:
135135
branch: master
136136
# local-dir: $TRAVIS_BUILD_DIR/target/generated-docs
137137
#before_deploy: cd $TRAVIS_BUILD_DIR && ./mvnw
138-
#
138+
##
139139
# local-dir: $TRAVIS_BUILD_DIR/frontender/dist
140140
#before_deploy:
141141
# - cd $TRAVIS_BUILD_DIR/frontender && npm i
142142
# - cd $TRAVIS_BUILD_DIR/frontender && npm run predeploy
143-
#
143+
##
144144
# local-dir: $TRAVIS_BUILD_DIR/css-boxing-model-and-layout-basics/dist
145145
#before_deploy:
146146
# - cd $TRAVIS_BUILD_DIR/css-boxing-model-and-layout-basics && npm i
147147
# - cd $TRAVIS_BUILD_DIR/css-boxing-model-and-layout-basics && npm run gh
148-
#
148+
##
149149
# local-dir: $TRAVIS_BUILD_DIR/css-correct-way-to-inline-blocks-with-flex/dist
150150
#before_deploy:
151151
# - cd $TRAVIS_BUILD_DIR/css-correct-way-to-inline-blocks-with-flex && npm i
152152
# - cd $TRAVIS_BUILD_DIR/css-correct-way-to-inline-blocks-with-flex && npm run gh
153-
#
153+
##
154154
# local-dir: $TRAVIS_BUILD_DIR/css-gradient-based-app-step-1/dist
155155
#before_deploy:
156156
# - cd $TRAVIS_BUILD_DIR/css-gradient-based-app-step-1 && npm i
157157
# - cd $TRAVIS_BUILD_DIR/css-gradient-based-app-step-1 && npm run gh
158+
##
159+
# local-dir: $TRAVIS_BUILD_DIR/css-gradient-based-app-step-2/dist
160+
#before_deploy:
161+
# - cd $TRAVIS_BUILD_DIR/css-gradient-based-app-step-2 && npm i
162+
# - cd $TRAVIS_BUILD_DIR/css-gradient-based-app-step-2 && npm run gh
158163
#
159-
local-dir: $TRAVIS_BUILD_DIR/css-gradient-based-app-step-2/dist
164+
local-dir: $TRAVIS_BUILD_DIR/scss-bootstrap4-starter/dist
160165
before_deploy:
161-
- cd $TRAVIS_BUILD_DIR/css-gradient-based-app-step-2 && npm i
162-
- cd $TRAVIS_BUILD_DIR/css-gradient-based-app-step-2 && npm run gh
166+
- cd $TRAVIS_BUILD_DIR/scss-bootstrap4-starter && npm i
167+
- cd $TRAVIS_BUILD_DIR/scss-bootstrap4-starter && npm run gh
163168
cache:
164169
directories:
165170
- ~/.m2

README.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ image::ui-principles.png[]
66

77
reference:
88

9-
- Read link:https://daggerok.github.io/css-examples[project reference documentation]
9+
- link:https://en.parceljs.org/recipes.html#bootstrap-+-fontawesome[Parcel Bundler + Bootstrap 4 + Font Awesome]
1010
- link:https://github.com/parcel-bundler/parcel/issues/1080#issuecomment-584745016[Parcel Bundler copy static resources assets files]
11+
- link:https://daggerok.github.io/css-examples[Project reference documentation]
1112
1213
_ui / ux "must have" topics_
1314

scss-bootstrap4-starter/package.json

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"name": "scss-bootstrap4-starter",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"dev": "parcel src/index.html --no-cache",
8+
"prebuild": "rimraf dist",
9+
"build": "parcel build src/index.html --no-cache",
10+
"preserve": "npm run build",
11+
"serve": "browser-sync start --no-notify --single -s ./dist/",
12+
"start": "pm2 start 'npm run dev' --name app",
13+
"restart": "pm2 restart app",
14+
"stop": "pm2 kill",
15+
"logs": "pm2 logs",
16+
"gh": "npm run build -- --public-url /css-examples/",
17+
"postgh": "ncp ./static ./dist --filter '**/*.*'",
18+
"predeploy": "npm run gh",
19+
"deploy": "gh-pages -e ./ -d ./dist -s '{*.*,.*,*,**}' --branch gh-pages --dotfiles=true -m \"Github Pages $(date +%Y-%m-%d) deployment\""
20+
},
21+
"keywords": [
22+
"ncp",
23+
"pm2",
24+
"rimraf",
25+
"parcel",
26+
"gh-pages",
27+
"webfontloader"
28+
],
29+
"author": "Maksim Kostromin <daggerok@gmail.com> (https://github.com/daggerok)",
30+
"license": "MIT",
31+
"devDependencies": {
32+
"@fortawesome/fontawesome-free": "5.12.1",
33+
"@types/node": "13.7.1",
34+
"babel-core": "^6.26.3",
35+
"babel-preset-env": "1.7.0",
36+
"gh-pages": "2.2.0",
37+
"ncp": "2.0.0",
38+
"npm-run-all": "4.1.5",
39+
"parcel-bundler": "1.12.4",
40+
"pm2": "4.2.3",
41+
"rimraf": "3.0.2",
42+
"sass": "^1.25.0",
43+
"webfontloader": "1.6.28"
44+
},
45+
"dependencies": {
46+
"bootstrap": "4.4.1",
47+
"jquery": "3.4.1",
48+
"popper.js": "1.16.1"
49+
},
50+
"babel": {
51+
"presets": [
52+
[
53+
"env",
54+
{
55+
"targets": {
56+
"browsers": [
57+
"last 2 versions",
58+
"safari >= 7",
59+
"chrome >= 36",
60+
"firefox >= 28"
61+
]
62+
}
63+
}
64+
]
65+
]
66+
}
67+
}

scss-bootstrap4-starter/src/app.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// import 'popper.js';
2+
import $ from 'jquery';
3+
// const $ = window.$;
4+
//
5+
import 'bootstrap'; // bootstrap.js
6+
//
7+
import WebFont from 'webfontloader';
8+
9+
WebFont.load({
10+
google: {
11+
families: [
12+
'Raleway',
13+
],
14+
},
15+
});
16+
17+
$('p').fadeOut(0, () => {
18+
console.log('fade out should be done fast!');
19+
$('p').fadeIn(2000, () => {
20+
console.log('fade in complete.');
21+
})
22+
});
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
7+
<link rel="shortcut icon" href="../static/favicon.ico" type="image/x-icon">
8+
<link rel="stylesheet" href="./main.scss">
9+
<title>Bootstrap4 SASS</title>
10+
</head>
11+
<body>
12+
<p>Hello!</p>
13+
<script src="./app.js"></script>
14+
</body>
15+
</html>

scss-bootstrap4-starter/src/main.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@import '~bootstrap/scss/bootstrap.scss'; // Import precompiled Bootstrap css
2+
@import '~@fortawesome/fontawesome-free/scss/fontawesome.scss';
3+
4+
body {
5+
font-family: 'Raleway', sans-serif;
6+
}
1.12 KB
Binary file not shown.

0 commit comments

Comments
 (0)