Skip to content

Commit 9e6fd50

Browse files
committed
Remove bower occurences
1 parent ed83dfc commit 9e6fd50

7 files changed

Lines changed: 7 additions & 58 deletions

File tree

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
node_modules
2-
bower_components
32
composer.phar
43
composer.lock
54
.env.*.php

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ Prerequisite
4444

4545
- Node.js 4.x or up (test up to 6.7.0)
4646
- Database (PostgreSQL, MySQL, MariaDB, SQLite, MSSQL) use charset `utf8`
47-
- npm and bower
47+
- npm
4848

4949
Get started
5050
---
5151

5252
1. Download a release and unzip or clone into a directory
53-
2. Enter the directory and type `bin/setup`, which will install npm/bower dependencies and create configs. The setup script is written in Bash, you would need bash as a prerequisite.
53+
2. Enter the directory and type `bin/setup`, which will install npm dependencies and create configs. The setup script is written in Bash, you would need bash as a prerequisite.
5454
3. Setup the configs, see more below
5555
4. Setup environment variables which will overwrite the configs
5656
5. Build front-end bundle by `npm run build:prod` (use `npm run build:dev` if you are in development)
@@ -63,7 +63,7 @@ If you are upgrading HackMD from an older version, follow these steps:
6363

6464
1. Fully stop your old server first (important)
6565
2. `git pull` or do whatever that updates the files
66-
3. `npm install && bower install` to update dependencies
66+
3. `npm install` to update dependencies
6767
4. Modify the file named `.sequelizerc`, change the value of the variable `url` with your db connection string
6868
For example: `postgres://username:password@localhost:5432/hackmd`
6969
5. Run `node_modules/.bin/sequelize db:migrate`, this step will migrate your db to the latest schema

app.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ app.use(i18n.init);
113113
// routes without sessions
114114
// static files
115115
app.use('/', express.static(__dirname + '/public', { maxAge: config.staticcachetime }));
116-
app.use('/vendor/', express.static(__dirname + '/bower_components', { maxAge: config.staticcachetime }));
117116

118117
//session
119118
app.use(session({
@@ -479,7 +478,7 @@ app.post('/uploadimage', function (req, res) {
479478
} else {
480479
if (config.debug)
481480
logger.info('SERVER received uploadimage: ' + JSON.stringify(files.image));
482-
481+
483482
try {
484483
switch (config.imageUploadType) {
485484
case 'filesystem':

bin/heroku

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set -e
44

55
if [ "$BUILD_ASSETS" = true ]; then
6-
BUILD_ASSETS=false npm install && npm run assets:install
6+
BUILD_ASSETS=false npm install
77

88
# setup config files
99
cat << EOF > .sequelizerc

bin/setup

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ EOF
1616
exit 0
1717
fi
1818

19-
if ! type bower > /dev/null
20-
then
21-
echo "bower is not installed, install via npm"
22-
npm install -g bower
23-
fi
24-
2519
echo "copy config files"
2620
if [ ! -f config.json ]; then
2721
cp config.json.example config.json
@@ -35,8 +29,8 @@ if [ ! -f .sequelizerc ]; then
3529
cp .sequelizerc.example .sequelizerc
3630
fi
3731

38-
echo "install npm and bower packages"
39-
BUILD_ASSETS=false npm install && bower install
32+
echo "install npm packages"
33+
BUILD_ASSETS=false npm install
4034

4135
cat << EOF
4236

bower.json

Lines changed: 0 additions & 40 deletions
This file was deleted.

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"scripts": {
88
"build:dev": "webpack --config webpack.config.js --progress --colors --watch",
99
"build:prod": "webpack --config webpack.production.js --progress --colors",
10-
"assets:install": "bower install",
1110
"postinstall": "bin/heroku",
1211
"start": "node app.js"
1312
},
@@ -142,8 +141,6 @@
142141
"devDependencies": {
143142
"babel-core": "^6.17.0",
144143
"babel-loader": "^6.2.5",
145-
"bower": "^1.7.9",
146-
"bower-webpack-plugin": "^0.1.9",
147144
"copy-webpack-plugin": "^4.0.1",
148145
"css-loader": "^0.25.0",
149146
"ejs-loader": "^0.3.0",

0 commit comments

Comments
 (0)