Skip to content

Commit

Permalink
Replace o holy makefile and bower with yarn
Browse files Browse the repository at this point in the history
  • Loading branch information
odinuge committed Jan 8, 2018
1 parent 0102f2e commit df508ae
Show file tree
Hide file tree
Showing 11 changed files with 2,718 additions and 104 deletions.
3 changes: 0 additions & 3 deletions .bowerrc

This file was deleted.

18 changes: 18 additions & 0 deletions assets.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
const assets = [
"animate.css",
"bootstrap/dist",
"chosen-js",
"lightbox2",
"bootstrap-datepicker",
"font-awesome",
"eonasdan-bootstrap-datetimepicker/build",
"bootstrap-chosen",
"bootstrap-table/dist",
"tablesorter",
"ionicons",
"hover.css",
"jquery/dist",
"moment/min/"
];

module.exports = assets;
28 changes: 0 additions & 28 deletions bower.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<link href="//code.ionicframework.com/ionicons/1.5.2/css/ionicons.min.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="{{ STATIC_URL }}lib/bootstrap-datepicker/css/datepicker3.css">
<link rel="stylesheet" href="{{ STATIC_URL }}lib/bootstrap-datepicker/dist/css/bootstrap-datepicker3.css">
<link rel="stylesheet" href="{% static "lib/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css" %}">
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
Expand Down Expand Up @@ -54,7 +54,7 @@

<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js" type="text/javascript"></script>
{% analytics %}
<script type="text/javascript" src="{{ STATIC_URL }}lib/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}lib/bootstrap-datepicker/dist/js/bootstrap-datepicker.js"></script>
<script type="text/javascript" src="{% static "lib/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js" %}"></script>
<script>$(function(){ $("#id_date").datepicker({format: 'yyyy-mm-dd'}); });</script>
<script>$(function(){ $("#id_deadline").datetimepicker({ format:'YYYY-MM-DD HH:mm' });});</script>
Expand Down
4 changes: 2 additions & 2 deletions itdagene/assets/frontend/styl/style.styl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import 'nib'
@import "/static/lib/animate.css/animate.min.css"
@import "/static/lib/font-awsome/css/font-awesome.min.css"
@import "/static/lib/ionicons/css/ionicons.min.css"
@import "/static/lib/font-awesome/css/font-awesome.min.css"
@import "/static/lib/ionicons/dist/css/ionicons.min.css"

@import url("https://fonts.googleapis.com/css?family=Open+Sans")
@import url("https://fonts.googleapis.com/css?family=Slabo+27px")
Expand Down
2 changes: 1 addition & 1 deletion itdagene/templates/base_admin.html
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ <h1>

{% block scripts %}
<script src="{% static "lib/bootstrap-table/dist/bootstrap-table.min.js" %}" type="text/javascript"></script>
<script src="{% static "lib/chosen/chosen.jquery.min.js" %}" type="text/javascript"></script>
<script src="{% static "lib/chosen-js/chosen.jquery.min.js" %}" type="text/javascript"></script>
{% chosen ".select" %}
{% chosen ".selectmultiple" %}
{% block inline-scripts %}{% endblock %}
Expand Down
4 changes: 2 additions & 2 deletions itdagene/templates/form.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
{% load crispy_forms_tags static %}

{% block styles %}
<link rel="stylesheet" href="{{ STATIC_URL }}lib/bootstrap-datepicker/css/datepicker3.css">
<link rel="stylesheet" href="{{ STATIC_URL }}lib/bootstrap-datepicker/dist/css/bootstrap-datepicker3.css">
<link rel="stylesheet" href="{% static "lib/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css" %}">
{% endblock %}
{% block scripts %}
<script type="text/javascript" src="{{ STATIC_URL }}lib/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}lib/bootstrap-datepicker/dist/js/bootstrap-datepicker.js"></script>
<script type="text/javascript" src="{% static "lib/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js" %}"></script>
<script>$(function(){ $("#id_date").datepicker({format: 'yyyy-mm-dd'}); });</script>
<script>$(function(){ $("#id_deadline").datetimepicker({ format:'YYYY-MM-DD HH:mm' });});</script>
Expand Down
6 changes: 3 additions & 3 deletions itdagene/templates/form_clean.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
{% load crispy_forms_tags static %}

{% block styles %}
<link rel="stylesheet" href="{{ STATIC_URL }}lib/bootstrap-datepicker/css/datepicker3.css">
<link rel="stylesheet" href="{{ STATIC_URL }}lib/bootstrap-datepicker/dist/css/bootstrap-datepicker3.css">
<link rel="stylesheet" href="{% static "lib/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css" %}">
{% endblock %}
{% block scripts %}
<script type="text/javascript" src="{{ STATIC_URL }}lib/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}lib/bootstrap-datepicker/dist/js/bootstrap-datepicker.js"></script>
<script type="text/javascript" src="{% static "lib/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js" %}"></script>
<script>$(function(){ $("#id_date").datepicker({format: 'yyyy-mm-dd'}); });</script>
<script>$(function(){ $("#id_deadline").datetimepicker({ format:'YYYY-MM-DD HH:mm' });});</script>
Expand Down Expand Up @@ -57,4 +57,4 @@ <h4 class="modal-title">{{ form.form_title }}</h4>
</div>
</div>
</div>
{% endif %}
{% endif %}
25 changes: 23 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,42 @@
"students"
],
"author": "Eirik Martiniussen Sylliaas",
"license": "Proprietary",
"license": "UNLICENSED",
"bugs": {
"url": "https://github.com/itdagene-ntnu/itdagene/issues"
},
"homepage": "https://github.com/itdagene-ntnu/itdagene",
"dependencies": {
"animate.css": "^3.5.2",
"bootstrap": "3",
"bootstrap-chosen": "^1.4.2",
"bootstrap-datepicker": "^1.7.1",
"bootstrap-table": "^1.11.2",
"browserify": "^7.0.0",
"chosen-js": "^1.8.2",
"eonasdan-bootstrap-datetimepicker": "^4.17.47",
"file-loader": "^1.1.6",
"font-awesome": "^4.7.0",
"hover.css": "^2.2.1",
"ionicons": "^3.0.0",
"jquery": "^3.2.1",
"lightbox2": "^2.10.0",
"moment": "^2.8.4",
"moment-timezone": "^0.5.14",
"nib": "^1.0.4",
"react": "^0.12.1",
"react-bootstrap": "^0.13.0",
"reactify": "^0.17.1",
"stylus": "^0.49.3",
"stylus": "^0.54.5",
"superagent": "^0.21.0",
"tablesorter": "^2.29.2",
"uglify-js": "^2.4.15",
"watchify": "^2.1.1"
},
"devDependencies": {
"copy-webpack-plugin": "^4.3.1",
"css-loader": "^0.28.8",
"stylus-loader": "^3.0.1",
"webpack": "^3.10.0"
}
}
44 changes: 44 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
const path = require("path");
const webpack = require("webpack");
const CopyWebpackPlugin = require("copy-webpack-plugin");

const Assets = require("./assets");

module.exports = {
entry: {
app: "./itdagene/assets/frontend/js/index.js"
},
output: {
path: __dirname + "/itdagene/assets/frontend/",
filename: "itdagene.js"
},
module: {
loaders: [
{
test: /\.styl$/,
loader:
"file-loader?name=itdagene.css!stylus-loader?paths=node_modules/bootstrap-stylus/stylus/"
}
]
},
plugins: [
new webpack.LoaderOptionsPlugin({
options: {
stylus: {
use: [require("nib")()],
import: ["~nib/lib/nib/index.styl"]
}
}
}),

new CopyWebpackPlugin(
Assets.map(asset => {
return {
from: path.resolve(__dirname, `./node_modules/${asset}/`),
toType: "dir",
to: path.resolve(__dirname, `./itdagene/assets/lib/${asset}/`)
};
})
)
]
};
Loading

0 comments on commit df508ae

Please sign in to comment.