mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-28 20:40:59 -05:00
Remove bower occurences
This commit is contained in:
parent
ed83dfc862
commit
9e6fd505e1
7 changed files with 7 additions and 58 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,5 +1,4 @@
|
||||||
node_modules
|
node_modules
|
||||||
bower_components
|
|
||||||
composer.phar
|
composer.phar
|
||||||
composer.lock
|
composer.lock
|
||||||
.env.*.php
|
.env.*.php
|
||||||
|
|
|
@ -44,13 +44,13 @@ Prerequisite
|
||||||
|
|
||||||
- Node.js 4.x or up (test up to 6.7.0)
|
- Node.js 4.x or up (test up to 6.7.0)
|
||||||
- Database (PostgreSQL, MySQL, MariaDB, SQLite, MSSQL) use charset `utf8`
|
- Database (PostgreSQL, MySQL, MariaDB, SQLite, MSSQL) use charset `utf8`
|
||||||
- npm and bower
|
- npm
|
||||||
|
|
||||||
Get started
|
Get started
|
||||||
---
|
---
|
||||||
|
|
||||||
1. Download a release and unzip or clone into a directory
|
1. Download a release and unzip or clone into a directory
|
||||||
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.
|
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.
|
||||||
3. Setup the configs, see more below
|
3. Setup the configs, see more below
|
||||||
4. Setup environment variables which will overwrite the configs
|
4. Setup environment variables which will overwrite the configs
|
||||||
5. Build front-end bundle by `npm run build:prod` (use `npm run build:dev` if you are in development)
|
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:
|
||||||
|
|
||||||
1. Fully stop your old server first (important)
|
1. Fully stop your old server first (important)
|
||||||
2. `git pull` or do whatever that updates the files
|
2. `git pull` or do whatever that updates the files
|
||||||
3. `npm install && bower install` to update dependencies
|
3. `npm install` to update dependencies
|
||||||
4. Modify the file named `.sequelizerc`, change the value of the variable `url` with your db connection string
|
4. Modify the file named `.sequelizerc`, change the value of the variable `url` with your db connection string
|
||||||
For example: `postgres://username:password@localhost:5432/hackmd`
|
For example: `postgres://username:password@localhost:5432/hackmd`
|
||||||
5. Run `node_modules/.bin/sequelize db:migrate`, this step will migrate your db to the latest schema
|
5. Run `node_modules/.bin/sequelize db:migrate`, this step will migrate your db to the latest schema
|
||||||
|
|
1
app.js
1
app.js
|
@ -113,7 +113,6 @@ app.use(i18n.init);
|
||||||
// routes without sessions
|
// routes without sessions
|
||||||
// static files
|
// static files
|
||||||
app.use('/', express.static(__dirname + '/public', { maxAge: config.staticcachetime }));
|
app.use('/', express.static(__dirname + '/public', { maxAge: config.staticcachetime }));
|
||||||
app.use('/vendor/', express.static(__dirname + '/bower_components', { maxAge: config.staticcachetime }));
|
|
||||||
|
|
||||||
//session
|
//session
|
||||||
app.use(session({
|
app.use(session({
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [ "$BUILD_ASSETS" = true ]; then
|
if [ "$BUILD_ASSETS" = true ]; then
|
||||||
BUILD_ASSETS=false npm install && npm run assets:install
|
BUILD_ASSETS=false npm install
|
||||||
|
|
||||||
# setup config files
|
# setup config files
|
||||||
cat << EOF > .sequelizerc
|
cat << EOF > .sequelizerc
|
||||||
|
|
10
bin/setup
10
bin/setup
|
@ -16,12 +16,6 @@ EOF
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! type bower > /dev/null
|
|
||||||
then
|
|
||||||
echo "bower is not installed, install via npm"
|
|
||||||
npm install -g bower
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "copy config files"
|
echo "copy config files"
|
||||||
if [ ! -f config.json ]; then
|
if [ ! -f config.json ]; then
|
||||||
cp config.json.example config.json
|
cp config.json.example config.json
|
||||||
|
@ -35,8 +29,8 @@ if [ ! -f .sequelizerc ]; then
|
||||||
cp .sequelizerc.example .sequelizerc
|
cp .sequelizerc.example .sequelizerc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "install npm and bower packages"
|
echo "install npm packages"
|
||||||
BUILD_ASSETS=false npm install && bower install
|
BUILD_ASSETS=false npm install
|
||||||
|
|
||||||
cat << EOF
|
cat << EOF
|
||||||
|
|
||||||
|
|
40
bower.json
40
bower.json
|
@ -1,40 +0,0 @@
|
||||||
{
|
|
||||||
"name": "hackmd",
|
|
||||||
"description": "Realtime collaborative markdown notes on all platforms.",
|
|
||||||
"main": "app.js",
|
|
||||||
"license": "MIT",
|
|
||||||
"homepage": "https://github.com/hackmdio/hackmd",
|
|
||||||
"moduleType": [
|
|
||||||
"node"
|
|
||||||
],
|
|
||||||
"ignore": [
|
|
||||||
"**/.*",
|
|
||||||
"node_modules",
|
|
||||||
"bower_components",
|
|
||||||
"test",
|
|
||||||
"tests"
|
|
||||||
],
|
|
||||||
"dependencies": {
|
|
||||||
"bootstrap": "~3.3.7",
|
|
||||||
"font-awesome": "~4.6.3",
|
|
||||||
"Ionicons": "ionicons#~2.0.1",
|
|
||||||
"reveal.js": "~3.3.0",
|
|
||||||
"spin.js": "~2.3.2",
|
|
||||||
"moment": "~2.15.1",
|
|
||||||
"handlebars": "~4.0.5",
|
|
||||||
"js-yaml": "~3.6.1",
|
|
||||||
"raphael": "~2.2.6",
|
|
||||||
"mermaid": "^6.0.0",
|
|
||||||
"MathJax": "^2.7.0",
|
|
||||||
"octicons": "~3.5.0",
|
|
||||||
"velocity": "^1.3.1",
|
|
||||||
"randomcolor": "randomColor#^0.4.4",
|
|
||||||
"Idle.Js": "idle.js#^1.0.0",
|
|
||||||
"gist-embed": "*",
|
|
||||||
"emojify.js": "^1.1.0",
|
|
||||||
"select2": "3.5.4"
|
|
||||||
},
|
|
||||||
"resolutions": {
|
|
||||||
"jquery": "~3.1.1"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -7,7 +7,6 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build:dev": "webpack --config webpack.config.js --progress --colors --watch",
|
"build:dev": "webpack --config webpack.config.js --progress --colors --watch",
|
||||||
"build:prod": "webpack --config webpack.production.js --progress --colors",
|
"build:prod": "webpack --config webpack.production.js --progress --colors",
|
||||||
"assets:install": "bower install",
|
|
||||||
"postinstall": "bin/heroku",
|
"postinstall": "bin/heroku",
|
||||||
"start": "node app.js"
|
"start": "node app.js"
|
||||||
},
|
},
|
||||||
|
@ -142,8 +141,6 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-core": "^6.17.0",
|
"babel-core": "^6.17.0",
|
||||||
"babel-loader": "^6.2.5",
|
"babel-loader": "^6.2.5",
|
||||||
"bower": "^1.7.9",
|
|
||||||
"bower-webpack-plugin": "^0.1.9",
|
|
||||||
"copy-webpack-plugin": "^4.0.1",
|
"copy-webpack-plugin": "^4.0.1",
|
||||||
"css-loader": "^0.25.0",
|
"css-loader": "^0.25.0",
|
||||||
"ejs-loader": "^0.3.0",
|
"ejs-loader": "^0.3.0",
|
||||||
|
|
Loading…
Reference in a new issue