inspirehep-search-js v2.0.74
Inspire-Search-Js
Inspire-search Angular JS module used in http://labs.inspirehep.net search results.
Installation
$ npm iRelease
❗❗❗ Release step in actions doesn't work ❗❗❗
- Setup your
tokenwith from theinspirehepnpm account (passbolt) - Edit in
package.jsontheversion. $ npm run-script postversion$ npm publish --access public- OPTIONAL: bump version in inspire-next
Demo
$ cd example; npm install; cd ..
$ npm run-script demoNavigate to http://localhost:8000 to see the demo.
Tests
$ npm testDocs
$ # build
$ npm run-script docs
$ # read
$ open docs/index.htmlHow to use?
Check out the example/ to see how to configure your app.
How to develop?
For easy development of inspirehep-search-js on top of inspire-next follow these steps:
1) Fork this repo and clone your personal fork.
laptop> $ git clone git@github.com:<username>/inspirehep-search-js.git
laptop> $ cd inspirehep-search-js2) Set ASSETS_DEBUG=True in your configuration for easier debugging in the browser (files do not get minified).
laptop> $ vim $DOCKER_DATA/tmp/virtualenv/var/inspirehep-instance/inspirehep.cfg3) Install Node.js and npm on your system. If you are using Ubuntu, create a symlink from node to nodejs (needed because of a naming conflict with the node package).
laptop> $ sudo apt-get update
laptop> $ sudo apt-get install nodejs
laptop> $ sudo ln -s "$(which nodejs)" /usr/bin/node
laptop> $ sudo apt-get install npm4) Install PhantomJS on your system and add PHANTOMJS_BIN:$(which phantomjs) env variable in .bashrc or .zshrc. to specify the path to the phantomjs binary.
laptop> $ sudo apt-get update
laptop> $ sudo apt-get install phantomjs5) Assuming you followed the current INSPIRE-HEP installation guide documentation, add the volume to services.yml to mount inspire-search-js on Docker.
laptop> $ vim /inspire-next/services.yml
```
static:
image: busybox
volumes:
- "<your-local-path>/inspirehep-search-js:/inspirehep-search-js"
```6) Restart the containers and open a bash in the web container.
laptop> $ docker-compose kill
laptop> $ docker-compose rm
laptop> $ docker-compose run web bash7) In the container bash, link the js volume to /static/node_modules. CAREFUL: if you run laptop> $ ./inspire-next/scripts/clean_assets, the link will have to be created again!
container> $ rm -rf /virtualenv/var/inspirehep-instance/static/node_modules/inspirehep-search-js
container> $ ln -s /inspirehep-search-js /virtualenv/var/inspirehep-instance/static/node_modules/inspirehep-search-js8) To install all dependencies and Gulp.js, in the inspirehep-search-js folder run:
laptop> $ npm install
laptop> $ nmp install gulp9) As you run inspire-next, start watching changes in the inspirehep-search-js folder. Every time a JS or HTML file is modified, tests will run and the dist/ folder will be recreated.
laptop> $ cd inspirehep-search-js
laptop> $ gulp watch10) Every time you modify a JavaScript or HTML template, hard refresh your browser to avoid caching and see your changes. If the changes are not reflected after refreshing, you might need to delete the gen folder from the container in order to prevent caching.
container> $ rm -rf /virtualenv/var/inspirehep-instance/static/gen/ .webassets-cache/4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago