Skip to content

Commit

Permalink
migrates to yarn from bower, re: #2916
Browse files Browse the repository at this point in the history
  • Loading branch information
robgaston committed Feb 2, 2018
1 parent b298e01 commit 31b0965
Show file tree
Hide file tree
Showing 36 changed files with 3,583 additions and 263 deletions.
3 changes: 0 additions & 3 deletions .bowerrc

This file was deleted.

2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ arches/settings_local.pyc

elasticsearch-5.2.1
virtualenv
arches/app/media/bower_components
arches/app/media/packages
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Net.html
arches/Net_files
.idea
arches/app/media/bower_components
arches/app/media/packages
node_modules
arches/tileserver/cache
docs/_build
arches/logs/*.log
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ install:
- python setup.py install
- pip install -r arches/install/requirements_dev.txt
- pip install coveralls
# - npm install -g bower
# - bower install
# - npm install -g yarn
# - yarn install

script:
- python manage.py test tests --pattern="*.py" --settings="tests.test_settings"
Expand Down
1 change: 1 addition & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--install.modules-folder "./arches/app/media/packages"
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ RUN apt-get update -y &&\
pkg-config &&\
curl -sL https://deb.nodesource.com/setup_6.x | bash - &&\
apt-get install nodejs &&\
npm install -g bower &&\
npm install -g yarn &&\
wget https://bootstrap.pypa.io/get-pip.py &&\
python get-pip.py

Expand Down Expand Up @@ -65,9 +65,9 @@ RUN rm -rf /tmp/*
# From here, run commands from ARCHES_ROOT
WORKDIR ${ARCHES_ROOT}

# Install Bower components
COPY ./bower.json ${ARCHES_ROOT}/bower.json
RUN bower --allow-root install
# Install Yarn components
COPY ./package.json ${ARCHES_ROOT}/package.json
RUN yarn install

# Install pip requirements
COPY ./arches/install/requirements.txt ${ARCHES_ROOT}/arches/install/requirements.txt
Expand Down
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ recursive-exclude virtualenv *
recursive-exclude arches/elasticsearch *
recursive-exclude arches/uploadedfiles *
recursive-exclude arches/tileserver *
recursive-exclude arches/app/media/bower_components *
recursive-exclude arches/app/media/packages *
recursive-exclude arches/app/media/js/docs *
global-exclude *.log
global-exclude *.pyc
global-exclude *.zip
global-exclude *.DS_Store
global-exclude *.orig
global-exclude *.orig
30 changes: 15 additions & 15 deletions arches/app/media/css/arches.css
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
@import url(../bower_components/fonts/openSans.css);
@import url(../bower_components/bootstrap/dist/css/bootstrap.min.css);
@import url(../bower_components/bootstrap3-datetimepicker/build/css/bootstrap-datetimepicker.min.css);
@import url(../bower_components/bootstrap-colorpicker/dist/css/bootstrap-colorpicker.min.css);
@import url(fonts/openSans.css);
@import url(../packages/bootstrap/dist/css/bootstrap.min.css);
@import url(../packages/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css);
@import url(../packages/bootstrap-colorpicker/dist/css/bootstrap-colorpicker.min.css);
@import url(nifty.min.css);
@import url(../bower_components/font-awesome/css/font-awesome.min.css);
@import url(../bower_components/ionicons/css/ionicons.min.css);
@import url(../packages/font-awesome/css/font-awesome.min.css);
@import url(../packages/ionicons/css/ionicons.min.css);
@import url(../plugins/themify-icons/themify-icons.min.css);
@import url(../plugins/chosen.min.css);
@import url(plugins/select2/select2.min.css);
@import url(plugins/select2/select2-bootstrap.min.css);
@import url(../bower_components/mapbox-gl/mapbox-gl.css);
@import url(../bower_components/nouislider/distribute/nouislider.min.css);
@import url(../bower_components/codemirror/lib/codemirror.css);
@import url(../bower_components/codemirror/theme/monokai.css);
@import url(../bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css);
@import url(../bower_components/datatables.net-responsive-bs/css/responsive.bootstrap.min.css);
@import url(../bower_components/nvd3/build/nv.d3.min.css);
@import url(../bower_components/leaflet/dist/leaflet.css);
@import url(../bower_components/leaflet-draw/dist/leaflet.draw.css);
@import url(../packages/mapbox-gl/dist/mapbox-gl.css);
@import url(../packages/nouislider/distribute/nouislider.min.css);
@import url(../packages/codemirror/lib/codemirror.css);
@import url(../packages/codemirror/theme/monokai.css);
@import url(../packages/datatables.net-bs/css/dataTables.bootstrap.css);
@import url(../packages/datatables.net-responsive-bs/css/responsive.bootstrap.css);
@import url(../packages/nvd3/build/nv.d3.min.css);
@import url(../packages/leaflet/dist/leaflet.css);
@import url(../packages/leaflet-draw/dist/leaflet.draw.css);
.regular-link {
color: #337ab7;
text-decoration: none;
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions arches/app/media/css/fonts/bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name":"openSans","main":["*.ttf","*.css"]}
24 changes: 24 additions & 0 deletions arches/app/media/css/fonts/openSans.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
src: local('Open Sans Light'), local('OpenSans-Light'), url(1ORHCpsQm3Vp6mXoaTYnF5uFdDttMLvmWuJdhhgs.ttf) format('truetype');
}
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans Regular'), local('OpenSans-Regular'), url(KeOuBrn4kERxqtaUH3aCWcynf_cDxXwCLxiixG1c.ttf) format('truetype');
}
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 600;
src: local('Open Sans SemiBold'), local('OpenSans-SemiBold'), url(_ySUJH_bn48VBG8sNSonF5uFdDttMLvmWuJdhhgs.ttf) format('truetype');
}
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(702ZOKiLJc3WVjuplzInF5uFdDttMLvmWuJdhhgs.ttf) format('truetype');
}
2 changes: 1 addition & 1 deletion arches/app/templates/base.htm
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
</body>

{% block javascript %}
<script src="{{ STATIC_URL }}bower_components/requirejs/require.js"></script>
<script src="{{ STATIC_URL }}packages/requirejs/require.js"></script>

{% block pre_require_js %}
{% endblock pre_require_js %}
Expand Down
2 changes: 1 addition & 1 deletion arches/app/templates/index.htm
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ <h3><a href="#">Accusamus et iusto odio dignissimos</a></h3>
<script src="{% static 'plugins/style-switcher.js' %}"></script>
<script src="{% static 'plugins/revolution-slider.js' %}"></script>
<script src="{% static 'plugins/cube-portfolio-lightbox.js' %}"></script>
<script src="{% static 'bower_components/knockout/dist/knockout.js' %}"></script>
<script src="{% static 'packages/knockout/build/output/knockout-latest.js' %}"></script>


<script>
Expand Down
90 changes: 45 additions & 45 deletions arches/app/templates/javascript.htm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% load i18n %}

<script>
var CKEDITOR_BASEPATH = '{{ STATIC_URL }}bower_components/ckeditor/';
var CKEDITOR_BASEPATH = '{{ STATIC_URL }}packages/ckeditor/';
require.config({
baseUrl: '{{ STATIC_URL }}js',
paths: {
Expand All @@ -14,53 +14,53 @@
'templates': '{% url "templates" ""%}'.replace(/\/$/, ""),
'datatype-config-templates': '{% url "datatype_template" ""%}'.replace(/\/$/, ""),
'nifty': '{{ STATIC_URL }}plugins/nifty',
'async': '{{ STATIC_URL }}bower_components/requirejs-plugins/src/async',
'text': '{{ STATIC_URL }}bower_components/requirejs-text/text',
'jquery': '{{ STATIC_URL }}bower_components/jquery/dist/jquery.min',
'js-cookie': '{{ STATIC_URL }}bower_components/js-cookie/src/js.cookie',
'select2': '{{ STATIC_URL }}bower_components/select2v3/index',
'bootstrap': '{{ STATIC_URL }}bower_components/bootstrap/dist/js/bootstrap.min',
'jquery-ui': '{{ STATIC_URL }}bower_components/jqueryui/ui//minified/jquery-ui.min',
'flexslider': '{{ STATIC_URL }}bower_components/flexslider/2.2.2/jquery.flexslider-min',
'easing': '{{ STATIC_URL }}bower_components/jquery-easing/jquery.easing.min',
'backbone': '{{ STATIC_URL }}bower_components/backbone/backbone',
'underscore': '{{ STATIC_URL }}bower_components/underscore/underscore-min',
'jquery-validate': '{{ STATIC_URL }}bower_components/jquery-validate/jquery.validate',
'd3': '{{ STATIC_URL }}bower_components/d3/d3.min',
'dropzone': '{{ STATIC_URL }}bower_components/dropzone/downloads/dropzone-amd-module.min',
'ckeditor': '{{ STATIC_URL }}bower_components/ckeditor/ckeditor',
'ckeditor-jquery': '{{ STATIC_URL }}bower_components/ckeditor/adapters/jquery',
'knockout': '{{ STATIC_URL }}bower_components/knockout/dist/knockout',
'knockout-mapping': '{{ STATIC_URL }}bower_components/bower-knockout-mapping/dist/knockout.mapping.min',
'moment': '{{ STATIC_URL }}bower_components/moment/min/moment.min',
'bootstrap-datetimepicker': '{{ STATIC_URL }}bower_components/bootstrap3-datetimepicker/build/js/bootstrap-datetimepicker.min',
'shp': '{{ STATIC_URL }}bower_components/shp/index',
'blueimp-gallery': '{{ STATIC_URL }}bower_components/blueimp-gallery/js/blueimp-gallery.min',
'blueimp-jquery': '{{ STATIC_URL }}bower_components/blueimp-gallery/js/jquery.blueimp-gallery.min',
'blueimp-helper': '{{ STATIC_URL }}bower_components/blueimp-gallery/js/blueimp-helper.min',
'datatables.net': '{{ STATIC_URL }}bower_components/datatables.net/js/jquery.dataTables.min',
'datatables.net-bs': '{{ STATIC_URL }}bower_components/datatables.net-bs/js/dataTables.bootstrap.min',
'datatables.net-responsive': '{{ STATIC_URL }}bower_components/datatables.net-responsive/js/dataTables.responsive.min',
'datatables.net-responsive-bs': '{{ STATIC_URL }}bower_components/datatables.net-responsive-bs/js/responsive.bootstrap',
'chosen': '{{ STATIC_URL }}bower_components/chosen/chosen.jquery.min',
'mapbox-gl': '{{ STATIC_URL }}bower_components/mapbox-gl/mapbox-gl',
'mapbox-gl-draw': '{{ STATIC_URL }}bower_components/mapbox-gl-draw/index',
'proj4': '{{ STATIC_URL }}bower_components/proj4/dist/proj4',
'noUiSlider': '{{ STATIC_URL }}bower_components/nouislider/distribute/nouislider.min',
'geojson-extent': '{{ STATIC_URL }}bower_components/geojson-extent/geojson-extent',
'bootstrap-colorpicker': '{{ STATIC_URL }}bower_components/bootstrap-colorpicker/dist/js/bootstrap-colorpicker.min',
'uuid': '{{ STATIC_URL }}bower_components/uuid.js/dist/uuid.core',
'turf': '{{ STATIC_URL }}bower_components/turf/index',
'geohash': '{{ STATIC_URL }}bower_components/geohash/latlon-geohash',
'nvd3': '{{ STATIC_URL }}bower_components/nvd3/build/nv.d3.min',
'leaflet': '{{ STATIC_URL }}bower_components/leaflet/dist/leaflet',
'leaflet-iiif': '{{ STATIC_URL }}bower_components/leaflet-iiif/leaflet-iiif',
'leaflet-draw': '{{ STATIC_URL }}bower_components/leaflet-draw/dist/leaflet.draw',
'mathjs': '{{ STATIC_URL }}bower_components/mathjs/dist/math.min'
'async': '{{ STATIC_URL }}packages/requirejs-plugins/src/async',
'text': '{{ STATIC_URL }}packages/requirejs-text/text',
'jquery': '{{ STATIC_URL }}packages/jquery/dist/jquery.min',
'js-cookie': '{{ STATIC_URL }}packages/js-cookie/src/js.cookie',
'select2': '{{ STATIC_URL }}packages/select2v3/select2.min',
'bootstrap': '{{ STATIC_URL }}packages/bootstrap/dist/js/bootstrap.min',
'jquery-ui': '{{ STATIC_URL }}packages/jqueryui/jquery-ui.min',
'flexslider': '{{ STATIC_URL }}packages/flexslider/jquery.flexslider-min',
'easing': '{{ STATIC_URL }}packages/jquery.easing/jquery.easing.min',
'backbone': '{{ STATIC_URL }}packages/backbone/backbone-min',
'underscore': '{{ STATIC_URL }}packages/underscore/underscore-min',
'jquery-validate': '{{ STATIC_URL }}packages/jquery-validate/dist/validate.min',
'd3': '{{ STATIC_URL }}packages/d3/d3.min',
'dropzone': '{{ STATIC_URL }}packages/dropzone/downloads/dropzone-amd-module.min',
'ckeditor': '{{ STATIC_URL }}packages/ckeditor/ckeditor',
'ckeditor-jquery': '{{ STATIC_URL }}packages/ckeditor/adapters/jquery',
'knockout': '{{ STATIC_URL }}packages/knockout/build/output/knockout-latest',
'knockout-mapping': '{{ STATIC_URL }}packages/knockout-mapping/dist/knockout.mapping.min',
'moment': '{{ STATIC_URL }}packages/moment/min/moment.min',
'bootstrap-datetimepicker': '{{ STATIC_URL }}packages/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min',
'shp': '{{ STATIC_URL }}packages/js-shapefile-to-geojson/shapefile',
'blueimp-gallery': '{{ STATIC_URL }}packages/blueimp-gallery/js/blueimp-gallery.min',
'blueimp-jquery': '{{ STATIC_URL }}packages/blueimp-gallery/js/jquery.blueimp-gallery.min',
'blueimp-helper': '{{ STATIC_URL }}packages/blueimp-gallery/js/blueimp-helper.min',
'datatables.net': '{{ STATIC_URL }}packages/datatables.net/js/jquery.dataTables',
'datatables.net-bs': '{{ STATIC_URL }}packages/datatables.net-bs/js/dataTables.bootstrap',
'datatables.net-responsive': '{{ STATIC_URL }}packages/datatables.net-responsive/js/dataTables.responsive',
'datatables.net-responsive-bs': '{{ STATIC_URL }}packages/datatables.net-responsive-bs/js/responsive.bootstrap',
'chosen': '{{ STATIC_URL }}packages/chosen-js/chosen.jquery',
'mapbox-gl': '{{ STATIC_URL }}packages/mapbox-gl/dist/mapbox-gl',
'mapbox-gl-draw': '{{ STATIC_URL }}packages/@mapbox/mapbox-gl-draw/dist/mapbox-gl-draw',
'proj4': '{{ STATIC_URL }}packages/proj4/dist/proj4',
'noUiSlider': '{{ STATIC_URL }}packages/nouislider/distribute/nouislider.min',
'geojson-extent': '{{ STATIC_URL }}packages/@mapbox/geojson-extent/geojson-extent',
'bootstrap-colorpicker': '{{ STATIC_URL }}packages/bootstrap-colorpicker/dist/js/bootstrap-colorpicker.min',
'uuid': '{{ STATIC_URL }}packages/uuidjs/dist/uuid.core',
'turf': '{{ STATIC_URL }}packages/turf/turf.min',
'geohash': '{{ STATIC_URL }}packages/geohash/latlon-geohash',
'nvd3': '{{ STATIC_URL }}packages/nvd3/build/nv.d3.min',
'leaflet': '{{ STATIC_URL }}packages/leaflet/dist/leaflet',
'leaflet-iiif': '{{ STATIC_URL }}packages/leaflet-iiif/leaflet-iiif',
'leaflet-draw': '{{ STATIC_URL }}packages/leaflet-draw/dist/leaflet.draw',
'mathjs': '{{ STATIC_URL }}packages/mathjs/dist/math.min'
},
packages: [{
name: "codemirror",
location: '{{ STATIC_URL }}bower_components/codemirror',
location: '{{ STATIC_URL }}packages/codemirror',
main: "lib/codemirror"
}],
shim: {
Expand Down
6 changes: 3 additions & 3 deletions arches/install/arches-project
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ def command_create_app(args):
options = vars(args)
proj_name = options['name']
cmd.handle(options)
bower_path = os.path.join(os.getcwd(), proj_name, proj_name)
os.chdir(bower_path)
subprocess.call("bower install", shell=True)
yarn_path = os.path.join(os.getcwd(), proj_name, proj_name)
os.chdir(yarn_path)
subprocess.call("yarn install", shell=True)
if os.path.isdir(os.path.join(os.getcwd(), 'logs')) != True:
os.mkdir(os.path.join(os.getcwd(), 'logs'))
open(os.path.join(os.getcwd(),'arches.log'), 'w').close()
Expand Down
3 changes: 0 additions & 3 deletions arches/install/arches-templates/project_name/.bowerrc

This file was deleted.

1 change: 1 addition & 0 deletions arches/install/arches-templates/project_name/.yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--install.modules-folder "./arches/app/media/packages"
59 changes: 0 additions & 59 deletions arches/install/arches-templates/project_name/bower.json

This file was deleted.

53 changes: 53 additions & 0 deletions arches/install/arches-templates/project_name/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"name": "arches",
"repository": {
"url": "git@github.com:archesproject/arches.git",
"type": "git"
},
"dependencies": {
"@mapbox/extent": "0.4.0",
"@mapbox/mapbox-gl-draw": "1.0.4",
"backbone": "1.1.2",
"blueimp-gallery": "2.15.2",
"bootstrap": "3.3.2",
"bootstrap-colorpicker": "^2.3.6",
"chosen-js": "1.5.1",
"ckeditor": "~4.6.2",
"codemirror": "^5.24.0",
"d3": "3.5.17",
"datatables.net": "~1.10.12",
"datatables.net-bs": "~1.10.12",
"datatables.net-responsive": "~2.1.0",
"datatables.net-responsive-bs": "~2.1.0",
"dropzone": "3.8.4",
"eonasdan-bootstrap-datetimepicker": "~4.17.43",
"flexslider": "~2.6.3",
"font-awesome": "~4.6.3",
"geohash": "chrisveness/latlon-geohash#1.1.0",
"ionicons": "~2.0.1",
"jquery": "2.2.1",
"jquery-validate": "1.0.2",
"jquery.easing": "^1.4.1",
"jqueryui": "1.11.1",
"js-cookie": "2.1.1",
"js-shapefile-to-geojson": "https://github.com/wavded/js-shapefile-to-geojson",
"knockout": "3.4.0",
"knockout-mapping": "~2.6.0",
"leaflet": "1.0.3",
"leaflet-draw": "^0.4.9",
"leaflet-iiif": "^1.1.1",
"mapbox-gl": "0.44.0",
"mathjs": "^3.11.4",
"moment": ">=2.10.5",
"nouislider": "8.5.1",
"nvd3": "^1.8.5",
"proj4": "^2.3.15",
"requirejs": "~2.3.2",
"requirejs-plugins": "1.0.2",
"requirejs-text": "2.0.12",
"select2v3": "select2/select2#3.5.1",
"turf": "3.0.14",
"underscore": "1.8.3",
"uuidjs": "^3.3.0"
}
}
Loading

0 comments on commit 31b0965

Please sign in to comment.