Skip to content

Commit fff1fe3

Browse files
ioandrdrjova
authored andcommitted
webpack: change of bundle structure
* Changes the bundle structure. (closes #5) * Adds Invenio license to the package. (closes #2) Signed-off by Ioannis Androulidakis <[email protected]>
1 parent 04eda71 commit fff1fe3

22 files changed

+793
-48
lines changed

.license

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Copyright (C) 2017 CERN.
2+
Invenio is free software; you can redistribute it
3+
and/or modify it under the terms of the GNU General Public License as
4+
published by the Free Software Foundation; either version 2 of the
5+
License, or (at your option) any later version.
6+
Invenio is distributed in the hope that it will be
7+
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
8+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9+
General Public License for more details.
10+
You should have received a copy of the GNU General Public License
11+
along with Invenio; if not, write to the
12+
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
13+
MA 02111-1307, USA.
14+
In applying this license, CERN does not
15+
waive the privileges and immunities granted to it by virtue of its status
16+
as an Intergovernmental Organization or submit itself to any jurisdiction.

LICENSE

+339
Large diffs are not rendered by default.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# invenio-statistics-js
2-
Invenio-Statistics client library for producing graphs based on statistics.
2+
Invenio-Statistics client library for producing D3 graphs based on statistics.

examples/bar/config.js

+23
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
/*
2+
* This file is part of Invenio.
3+
* Copyright (C) 2017 CERN.
4+
*
5+
* Invenio is free software; you can redistribute it and/or
6+
* modify it under the terms of the GNU General Public License as
7+
* published by the Free Software Foundation; either version 2 of the
8+
* License, or (at your option) any later version.
9+
*
10+
* Invenio is distributed in the hope that it will be useful, but
11+
* WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
* General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with Invenio; if not, write to the Free Software Foundation, Inc.,
17+
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
18+
*
19+
* In applying this license, CERN does not
20+
* waive the privileges and immunities granted to it by virtue of its status
21+
* as an Intergovernmental Organization or submit itself to any jurisdiction.
22+
*/
23+
124
// Export configuration object
225
const config = {
326
width: 800,

examples/bar/index.html

+19-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
<!-- Copyright (C) 2017 CERN.
2+
Invenio is free software; you can redistribute it
3+
and/or modify it under the terms of the GNU General Public License as
4+
published by the Free Software Foundation; either version 2 of the
5+
License, or (at your option) any later version.
6+
Invenio is distributed in the hope that it will be
7+
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
8+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9+
General Public License for more details.
10+
You should have received a copy of the GNU General Public License
11+
along with Invenio; if not, write to the
12+
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
13+
MA 02111-1307, USA.
14+
In applying this license, CERN does not
15+
waive the privileges and immunities granted to it by virtue of its status
16+
as an Intergovernmental Organization or submit itself to any jurisdiction.
17+
-->
18+
119
<!DOCTYPE html>
220
<html lang='en'>
321
<head>
@@ -6,6 +24,6 @@
624
</head>
725
<body>
826
<input id="option" type="button" value="Toggle"/>
9-
<script src="../../dist/bar.bundle.js"></script>
27+
<script src="../dist/bar.bundle.js"></script>
1028
</body>
1129
</html>

examples/bar/index.js

+23
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
/*
2+
* This file is part of Invenio.
3+
* Copyright (C) 2017 CERN.
4+
*
5+
* Invenio is free software; you can redistribute it and/or
6+
* modify it under the terms of the GNU General Public License as
7+
* published by the Free Software Foundation; either version 2 of the
8+
* License, or (at your option) any later version.
9+
*
10+
* Invenio is distributed in the hope that it will be useful, but
11+
* WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
* General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with Invenio; if not, write to the Free Software Foundation, Inc.,
17+
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
18+
*
19+
* In applying this license, CERN does not
20+
* waive the privileges and immunities granted to it by virtue of its status
21+
* as an Intergovernmental Organization or submit itself to any jurisdiction.
22+
*/
23+
124
import _ from 'lodash';
225
import config from './config';
326
import './styles.scss';

examples/bar/styles.scss

+28-4
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,41 @@
1+
/*
2+
* This file is part of Invenio.
3+
* Copyright (C) 2017 CERN.
4+
*
5+
* Invenio is free software; you can redistribute it and/or
6+
* modify it under the terms of the GNU General Public License as
7+
* published by the Free Software Foundation; either version 2 of the
8+
* License, or (at your option) any later version.
9+
*
10+
* Invenio is distributed in the hope that it will be useful, but
11+
* WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
* General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with Invenio; if not, write to the Free Software Foundation, Inc.,
17+
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
18+
*
19+
* In applying this license, CERN does not
20+
* waive the privileges and immunities granted to it by virtue of its status
21+
* as an Intergovernmental Organization or submit itself to any jurisdiction.
22+
*/
23+
124
$linecolor: #4682b4;
225
$axiscolor: #808080;
326
$gridcolor: #d3d3d3;
27+
$barcolor: #4652b4;
428

529
body {
630
font: 14px Roboto;
731
}
832

933
.bar {
10-
fill: steelblue;
11-
}
34+
fill: $barcolor;
1235

13-
.bar:hover {
14-
fill: brown;
36+
:hover {
37+
fill: brown;
38+
}
1539
}
1640

1741
.axis {

examples/data/data.js

+23
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/line/config.js

+23
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
/*
2+
* This file is part of Invenio.
3+
* Copyright (C) 2017 CERN.
4+
*
5+
* Invenio is free software; you can redistribute it and/or
6+
* modify it under the terms of the GNU General Public License as
7+
* published by the Free Software Foundation; either version 2 of the
8+
* License, or (at your option) any later version.
9+
*
10+
* Invenio is distributed in the hope that it will be useful, but
11+
* WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
* General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with Invenio; if not, write to the Free Software Foundation, Inc.,
17+
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
18+
*
19+
* In applying this license, CERN does not
20+
* waive the privileges and immunities granted to it by virtue of its status
21+
* as an Intergovernmental Organization or submit itself to any jurisdiction.
22+
*/
23+
124
// Export configuration object
225
const config = {
326
width: 800,

examples/line/index.html

+19-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
<!-- Copyright (C) 2017 CERN.
2+
Invenio is free software; you can redistribute it
3+
and/or modify it under the terms of the GNU General Public License as
4+
published by the Free Software Foundation; either version 2 of the
5+
License, or (at your option) any later version.
6+
Invenio is distributed in the hope that it will be
7+
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
8+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9+
General Public License for more details.
10+
You should have received a copy of the GNU General Public License
11+
along with Invenio; if not, write to the
12+
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
13+
MA 02111-1307, USA.
14+
In applying this license, CERN does not
15+
waive the privileges and immunities granted to it by virtue of its status
16+
as an Intergovernmental Organization or submit itself to any jurisdiction.
17+
-->
18+
119
<!DOCTYPE html>
220
<html lang='en'>
321
<head>
@@ -6,6 +24,6 @@
624
</head>
725
<body>
826
<input id="option" type="button" value="Toggle"/>
9-
<script src="../../dist/line.bundle.js"></script>
27+
<script src="../dist/line.bundle.js"></script>
1028
</body>
1129
</html>

examples/line/index.js

+23
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
/*
2+
* This file is part of Invenio.
3+
* Copyright (C) 2017 CERN.
4+
*
5+
* Invenio is free software; you can redistribute it and/or
6+
* modify it under the terms of the GNU General Public License as
7+
* published by the Free Software Foundation; either version 2 of the
8+
* License, or (at your option) any later version.
9+
*
10+
* Invenio is distributed in the hope that it will be useful, but
11+
* WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
* General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with Invenio; if not, write to the Free Software Foundation, Inc.,
17+
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
18+
*
19+
* In applying this license, CERN does not
20+
* waive the privileges and immunities granted to it by virtue of its status
21+
* as an Intergovernmental Organization or submit itself to any jurisdiction.
22+
*/
23+
124
import _ from 'lodash';
225
import config from './config';
326
import './styles.scss';

examples/line/styles.scss

+23
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
/*
2+
* This file is part of Invenio.
3+
* Copyright (C) 2017 CERN.
4+
*
5+
* Invenio is free software; you can redistribute it and/or
6+
* modify it under the terms of the GNU General Public License as
7+
* published by the Free Software Foundation; either version 2 of the
8+
* License, or (at your option) any later version.
9+
*
10+
* Invenio is distributed in the hope that it will be useful, but
11+
* WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
* General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with Invenio; if not, write to the Free Software Foundation, Inc.,
17+
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
18+
*
19+
* In applying this license, CERN does not
20+
* waive the privileges and immunities granted to it by virtue of its status
21+
* as an Intergovernmental Organization or submit itself to any jurisdiction.
22+
*/
23+
124
$linecolor: #4682b4;
225
$axiscolor: #808080;
326
$gridcolor: #d3d3d3;

package-lock.json

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,23 @@
44
"description": "",
55
"main": "index.js",
66
"scripts": {
7-
"build": "rm -rf ./dist && webpack --env build",
7+
"build": "rm -rf ./dist && rm -rf ./examples/dist && webpack --env build",
88
"test": "rm -rf ./coverage && karma start",
9-
"dev": "rm -rf ./dist && webpack --progress --config webpack.config.js",
9+
"dev": "rm -rf ./dist && rm -rf ./examples/dist && webpack --progress",
1010
"start": "node_modules/.bin/webpack-dev-server",
1111
"doc": "rm -rf ./docs && node_modules/.bin/jsdoc -c conf.json"
1212
},
1313
"keywords": [],
14-
"author": "",
15-
"license": "ISC",
14+
"author": "CERN",
15+
"license": "GPLv2",
1616
"devDependencies": {
1717
"babel-core": "^6.25.0",
1818
"babel-eslint": "^7.2.3",
1919
"babel-loader": "^7.1.1",
2020
"babel-plugin-lodash": "^3.2.11",
2121
"babel-polyfill": "^6.23.0",
2222
"babel-preset-env": "^1.6.0",
23+
"banner-webpack-plugin": "^0.2.3",
2324
"css-loader": "^0.28.4",
2425
"eslint": "^4.2.0",
2526
"eslint-config-airbnb": "^15.0.1",

src/bar/bar.js

+23
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
/*
2+
* This file is part of Invenio.
3+
* Copyright (C) 2017 CERN.
4+
*
5+
* Invenio is free software; you can redistribute it and/or
6+
* modify it under the terms of the GNU General Public License as
7+
* published by the Free Software Foundation; either version 2 of the
8+
* License, or (at your option) any later version.
9+
*
10+
* Invenio is distributed in the hope that it will be useful, but
11+
* WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
* General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with Invenio; if not, write to the Free Software Foundation, Inc.,
17+
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
18+
*
19+
* In applying this license, CERN does not
20+
* waive the privileges and immunities granted to it by virtue of its status
21+
* as an Intergovernmental Organization or submit itself to any jurisdiction.
22+
*/
23+
124
import * as d3 from 'd3';
225
import _ from 'lodash';
326
import Graph from '../graph/graph';

src/graph/graph.js

+23
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
/*
2+
* This file is part of Invenio.
3+
* Copyright (C) 2017 CERN.
4+
*
5+
* Invenio is free software; you can redistribute it and/or
6+
* modify it under the terms of the GNU General Public License as
7+
* published by the Free Software Foundation; either version 2 of the
8+
* License, or (at your option) any later version.
9+
*
10+
* Invenio is distributed in the hope that it will be useful, but
11+
* WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
* General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with Invenio; if not, write to the Free Software Foundation, Inc.,
17+
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
18+
*
19+
* In applying this license, CERN does not
20+
* waive the privileges and immunities granted to it by virtue of its status
21+
* as an Intergovernmental Organization or submit itself to any jurisdiction.
22+
*/
23+
124
import * as d3 from 'd3';
225

326
/** Class representing an abstract Graph. */

0 commit comments

Comments
 (0)