mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
migrate verdaccio-docker-local-storage from V4 to V6 (#2686)
This commit is contained in:
parent
be3f74e528
commit
7a45f4e244
15 changed files with 414 additions and 0 deletions
|
@ -3,3 +3,5 @@
|
|||
> We recommend to have installed [docker-compose >= 1.29.0](https://github.com/docker/compose/releases/tag/1.29.2)
|
||||
|
||||
- [Docker + Nginx + Verdaccio](reverse_proxy/nginx/README.md)
|
||||
- [Docker + Apache + Verdaccio](apache-verdaccio/README.md)
|
||||
- [Docker + Local Storage Volume + Verdaccio](docker-local-storage-volume/README.md)
|
||||
|
|
|
@ -0,0 +1,71 @@
|
|||
#
|
||||
# This is the config file used for the docker images.
|
||||
# It allows all users to do anything, so don't use it on production systems.
|
||||
#
|
||||
# Do not configure host and port under `listen` in this file
|
||||
# as it will be ignored when using docker.
|
||||
# see https://github.com/verdaccio/verdaccio/blob/master/wiki/docker.md#docker-and-custom-port-configuration
|
||||
#
|
||||
# Look here for more config file examples:
|
||||
# https://github.com/verdaccio/verdaccio/tree/master/conf
|
||||
#
|
||||
|
||||
# path to a directory with all packages
|
||||
storage: /verdaccio/storage
|
||||
|
||||
auth:
|
||||
htpasswd:
|
||||
file: /verdaccio/conf/htpasswd
|
||||
# Maximum amount of users allowed to register, defaults to "+inf".
|
||||
# You can set this to -1 to disable registration.
|
||||
#max_users: 1000
|
||||
security:
|
||||
api:
|
||||
jwt:
|
||||
sign:
|
||||
expiresIn: 60d
|
||||
notBefore: 1
|
||||
web:
|
||||
sign:
|
||||
expiresIn: 7d
|
||||
|
||||
# a list of other known repositories we can talk to
|
||||
uplinks:
|
||||
npmjs:
|
||||
url: https://registry.npmjs.org/
|
||||
|
||||
packages:
|
||||
'@jota/*':
|
||||
access: $all
|
||||
publish: $all
|
||||
|
||||
'@*/*':
|
||||
# scoped packages
|
||||
access: $all
|
||||
publish: $all
|
||||
proxy: npmjs
|
||||
|
||||
'**':
|
||||
# allow all users (including non-authenticated users) to read and
|
||||
# publish all packages
|
||||
#
|
||||
# you can specify usernames/groupnames (depending on your auth plugin)
|
||||
# and three keywords: "$all", "$anonymous", "$authenticated"
|
||||
access: $all
|
||||
|
||||
# allow all known users to publish packages
|
||||
# (anyone can register by default, remember?)
|
||||
publish: $all
|
||||
|
||||
# if package is not available locally, proxy requests to 'npmjs' registry
|
||||
proxy: npmjs
|
||||
|
||||
# To use `npm audit` uncomment the following section
|
||||
middlewares:
|
||||
audit:
|
||||
enabled: true
|
||||
|
||||
# log settings
|
||||
logs:
|
||||
- { type: stdout, format: pretty, level: trace }
|
||||
#- {type: file, path: verdaccio.log, level: info}
|
|
@ -0,0 +1 @@
|
|||
jpicado:$6vkdNgRX2npc:autocreated 2017-07-11T18:48:38.003Z
|
|
@ -0,0 +1,12 @@
|
|||
services:
|
||||
verdaccio:
|
||||
image: verdaccio/verdaccio:nightly-master
|
||||
container_name: verdaccio-docker-local-storage-vol
|
||||
ports:
|
||||
- '4873:4873'
|
||||
volumes:
|
||||
- './storage:/verdaccio/storage'
|
||||
- './conf:/verdaccio/conf'
|
||||
volumes:
|
||||
verdaccio:
|
||||
driver: local
|
31
docker-examples/v6/docker-local-storage-volume/readme.md
Normal file
31
docker-examples/v6/docker-local-storage-volume/readme.md
Normal file
|
@ -0,0 +1,31 @@
|
|||
# Verdaccio and simple local storage
|
||||
|
||||
This example shows a simple configuration for `verdaccio` plus the default local storage with the minimum configuration required using `docker-compose`.
|
||||
|
||||
Contains
|
||||
|
||||
- conf: Configuration file and default user httpasswd
|
||||
- storage: A published default package with 2 versions.
|
||||
|
||||
```bash
|
||||
$> docker-compose up
|
||||
```
|
||||
|
||||
## Login
|
||||
|
||||
If you want to login into the Verdaccio instance created via these Docker Examples, please try:
|
||||
|
||||
Username: jpicado
|
||||
Password: jpicado
|
||||
|
||||
## Running in Dokku
|
||||
|
||||
If you use Dokku, an open-source alternative for Heroku, you can run this example using the following steps:
|
||||
|
||||
1. Create a new application `dokku apps:create verdaccio`
|
||||
2. Pull the verdaccio image `docker pull verdaccio/verdaccio:`
|
||||
3. Tag the docker image for the app: `docker tag verdaccio/verdaccio:nightly-master dokku/verdaccio:v1`
|
||||
4. Create the directories for persistent storage `mkdir -p /var/lib/dokku/data/storage/verdaccio/storage`, `mkdir -p /var/lib/dokku/data/storage/verdaccio/storage`
|
||||
5. Mount the volumes: `dokku storage:mount verdaccio /var/lib/dokku/data/storage/verdaccio/storage:/verdaccio/storage` and `dokku storage:mount verdaccio /var/lib/dokku/data/storage/verdaccio/conf:/verdaccio/conf`
|
||||
6. Deploy the docker image `dokku tags:deploy verdaccio v1`
|
||||
7. Enjoy the application
|
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
"name": "@jota/pk1-juan-1",
|
||||
"versions": {
|
||||
"1.0.0": {
|
||||
"name": "@jota/pk1-juan-1",
|
||||
"version": "1.0.0",
|
||||
"description": "Simple React Webpack Babel Starter Kit",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": {
|
||||
"name": "Juan Picado",
|
||||
"email": "juan@jotadeveloper.com"
|
||||
},
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"angular": "^1.6.8",
|
||||
"angular2": "^2.0.0-beta.21",
|
||||
"babel-core": "^6.26.0",
|
||||
"babel-env": "^2.4.1",
|
||||
"jquery": "^3.2.1",
|
||||
"react": "^16.2.0",
|
||||
"test_npm_18": "^1.0.1",
|
||||
"typescript": "^2.6.2",
|
||||
"verdaccio": "^2.7.2",
|
||||
"verdaccio-memory": "0.0.3",
|
||||
"webpack": "^3.10.0"
|
||||
},
|
||||
"readmeFilename": "README.md",
|
||||
"_id": "@jota/pk1-juan-1@1.0.0",
|
||||
"_npmVersion": "5.5.1",
|
||||
"_nodeVersion": "8.7.0",
|
||||
"_npmUser": {},
|
||||
"dist": {
|
||||
"integrity": "sha512-aKXCuBayXFdSVt4+94B7lqvsPsM0KIsIcXvc7Ghkir3OsE6FQl2bXBBWe6deNuTwJihsFvDbCDiMq+0TIUENBQ==",
|
||||
"shasum": "faf627d746ce7c670aed088b761960716e68e186",
|
||||
"tarball": "http://0.0.0.0:4873/@jota/pk1-juan-1/-/@jota/pk1-juan-1-1.0.0.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dist-tags": {
|
||||
"latest": "1.0.0"
|
||||
},
|
||||
"time": {
|
||||
"modified": "2018-01-17T18:32:18.049Z",
|
||||
"created": "2018-01-17T18:32:18.049Z",
|
||||
"1.0.0": "2018-01-17T18:32:18.049Z"
|
||||
},
|
||||
"_distfiles": {},
|
||||
"_attachments": {
|
||||
"pk1-juan-1-1.0.0.tgz": {
|
||||
"shasum": "faf627d746ce7c670aed088b761960716e68e186",
|
||||
"version": "1.0.0"
|
||||
}
|
||||
},
|
||||
"_uplinks": {},
|
||||
"_rev": "3-5cf06458deec6f04",
|
||||
"readme": "# react-webpack-babel\nSimple React Webpack Babel Starter Kit\n\nTired of complicated starters with 200MB of dependencies which are hard to understand and modify?\n\nTry this is a simple [React](https://facebook.github.io/react/), [Webpack](http://webpack.github.io/) and [Babel](https://babeljs.io/) application with nothing else in it.\n\n### What's in it?\n\n* Simple src/index.jsx and src/index.css (local module css).\n* Webpack configuration for development (with hot reloading) and production (with minification).\n* CSS module loading, so you can include your css by ```import styles from './path/to.css';```.\n* Both js(x) and css hot loaded during development.\n* [Webpack Dashboard Plugin](https://github.com/FormidableLabs/webpack-dashboard) on dev server.\n\n### To run\n\n* You'll need to have [git](https://git-scm.com/) and [node](https://nodejs.org/en/) installed in your system.\n* Fork and clone the project:\n\n```\ngit clone https://github.com/alicoding/react-webpack-babel.git\n```\n\n* Then install the dependencies:\n\n```\nnpm install\n```\n\n* Run development server:\n\n```\nnpm start\n```\n\n* Or you can run development server with [webpack-dashboard](https://github.com/FormidableLabs/webpack-dashboard):\n\n```\nnpm run dev\n```\n\nOpen the web browser to `http://localhost:8888/`\n\n### To build the production package\n\n```\nnpm run build\n```\n\n### Nginx Config\n\nHere is an example Nginx config:\n```\nserver {\n\t# ... root and other options\n\n\tgzip on;\n\tgzip_http_version 1.1;\n\tgzip_types text/plain text/css text/xml application/javascript image/svg+xml;\n\n\tlocation / {\n\t\ttry_files $uri $uri/ /index.html;\n\t}\n\n\tlocation ~ \\.html?$ {\n\t\texpires 1d;\n\t}\n\n\tlocation ~ \\.(svg|ttf|js|css|svgz|eot|otf|woff|jpg|jpeg|gif|png|ico)$ {\n\t\taccess_log off;\n\t\tlog_not_found off;\n\t\texpires max;\n\t}\n}\n```\n\n### Eslint\nThere is a .eslint.yaml config for eslint ready with React plugin.\nTo use it, you need to install additional dependencies though:\n\n```\nnpm install --save-dev eslint eslint-plugin-react\n```\n\nTo do the actual linting, run:\n\n```\nnpm run lint\n```\n\n### Notes on importing css styles\n* styles having /src/ in their absolute path are considered part of the application and exported as local css modules.\n* other styles are considered global styles used by many components and are included in the css bundle directly.\n\n### Contribute\nPlease contribute to the project if you know how to make it better, including this README :)"
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,105 @@
|
|||
{
|
||||
"name": "@jota/pk1-juan",
|
||||
"versions": {
|
||||
"1.0.0": {
|
||||
"name": "@jota/pk1-juan",
|
||||
"version": "1.0.0",
|
||||
"description": "Simple React Webpack Babel Starter Kit",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": {
|
||||
"name": "Juan Picado",
|
||||
"email": "juan@jotadeveloper.com"
|
||||
},
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"angular": "^1.6.8",
|
||||
"angular2": "^2.0.0-beta.21",
|
||||
"babel-core": "^6.26.0",
|
||||
"babel-env": "^2.4.1",
|
||||
"jquery": "^3.2.1",
|
||||
"react": "^16.2.0",
|
||||
"test_npm_18": "^1.0.1",
|
||||
"typescript": "^2.6.2",
|
||||
"verdaccio": "^2.7.2",
|
||||
"verdaccio-memory": "0.0.3",
|
||||
"webpack": "^3.10.0"
|
||||
},
|
||||
"readmeFilename": "README.md",
|
||||
"_id": "@jota/pk1-juan@1.0.0",
|
||||
"_npmVersion": "5.5.1",
|
||||
"_nodeVersion": "8.7.0",
|
||||
"_npmUser": {},
|
||||
"dist": {
|
||||
"integrity": "sha512-JC4y+iHrUpD+li3Pf9z2oFxw2Mtbqi6vgnIDBB3H/P/t0gAuCKK/LJ86kV7TRyvQwVvyJk1qI61iOVLiMwjZ8Q==",
|
||||
"shasum": "95a21c648054c7144a23995a519930255f35b6c2",
|
||||
"tarball": "http://0.0.0.0:4873/@jota/pk1-juan/-/@jota/pk1-juan-1.0.0.tgz"
|
||||
}
|
||||
},
|
||||
"1.0.1": {
|
||||
"name": "@jota/pk1-juan",
|
||||
"version": "1.0.1",
|
||||
"description": "Simple React Webpack Babel Starter Kit",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": {
|
||||
"name": "Juan Picado",
|
||||
"email": "juan@jotadeveloper.com"
|
||||
},
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"angular": "^1.6.8",
|
||||
"angular2": "^2.0.0-beta.21",
|
||||
"babel-core": "^6.26.0",
|
||||
"babel-env": "^2.4.1",
|
||||
"jquery": "^3.2.1",
|
||||
"react": "^16.2.0",
|
||||
"test_npm_18": "^1.0.1",
|
||||
"typescript": "^2.6.2",
|
||||
"verdaccio": "^2.7.2",
|
||||
"verdaccio-memory": "0.0.3",
|
||||
"webpack": "^3.10.0"
|
||||
},
|
||||
"readmeFilename": "README.md",
|
||||
"_id": "@jota/pk1-juan@1.0.1",
|
||||
"_npmVersion": "5.5.1",
|
||||
"_nodeVersion": "8.7.0",
|
||||
"_npmUser": {},
|
||||
"dist": {
|
||||
"integrity": "sha512-copZNn2mMX8S3W9czxd3GXKj8vKu1v7JrUD9zOtriP8v9AvZOHIt6nW8+1114cumNGukFxjBO+2VlZC793ynTA==",
|
||||
"shasum": "ed59869c54d1bec7bc19732c4c23c97633ea30e2",
|
||||
"tarball": "http://0.0.0.0:4873/@jota/pk1-juan/-/@jota/pk1-juan-1.0.1.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dist-tags": {
|
||||
"latest": "1.0.0",
|
||||
"beta2": "1.0.1"
|
||||
},
|
||||
"time": {
|
||||
"modified": "2018-01-17T18:49:09.087Z",
|
||||
"created": "2018-01-17T18:27:39.952Z",
|
||||
"1.0.0": "2018-01-17T18:27:39.952Z",
|
||||
"1.0.1": "2018-01-17T18:49:09.087Z"
|
||||
},
|
||||
"_distfiles": {},
|
||||
"_attachments": {
|
||||
"pk1-juan-1.0.0.tgz": {
|
||||
"shasum": "95a21c648054c7144a23995a519930255f35b6c2",
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"pk1-juan-1.0.1.tgz": {
|
||||
"shasum": "ed59869c54d1bec7bc19732c4c23c97633ea30e2",
|
||||
"version": "1.0.1"
|
||||
}
|
||||
},
|
||||
"_uplinks": {},
|
||||
"_rev": "18-5118c5019a188840",
|
||||
"readme": "# react-webpack-babel\nSimple React Webpack Babel Starter Kit\n\nTired of complicated starters with 200MB of dependencies which are hard to understand and modify?\n\nTry this is a simple [React](https://facebook.github.io/react/), [Webpack](http://webpack.github.io/) and [Babel](https://babeljs.io/) application with nothing else in it.\n\n### What's in it?\n\n* Simple src/index.jsx and src/index.css (local module css).\n* Webpack configuration for development (with hot reloading) and production (with minification).\n* CSS module loading, so you can include your css by ```import styles from './path/to.css';```.\n* Both js(x) and css hot loaded during development.\n* [Webpack Dashboard Plugin](https://github.com/FormidableLabs/webpack-dashboard) on dev server.\n\n### To run\n\n* You'll need to have [git](https://git-scm.com/) and [node](https://nodejs.org/en/) installed in your system.\n* Fork and clone the project:\n\n```\ngit clone https://github.com/alicoding/react-webpack-babel.git\n```\n\n* Then install the dependencies:\n\n```\nnpm install\n```\n\n* Run development server:\n\n```\nnpm start\n```\n\n* Or you can run development server with [webpack-dashboard](https://github.com/FormidableLabs/webpack-dashboard):\n\n```\nnpm run dev\n```\n\nOpen the web browser to `http://localhost:8888/`\n\n### To build the production package\n\n```\nnpm run build\n```\n\n### Nginx Config\n\nHere is an example Nginx config:\n```\nserver {\n\t# ... root and other options\n\n\tgzip on;\n\tgzip_http_version 1.1;\n\tgzip_types text/plain text/css text/xml application/javascript image/svg+xml;\n\n\tlocation / {\n\t\ttry_files $uri $uri/ /index.html;\n\t}\n\n\tlocation ~ \\.html?$ {\n\t\texpires 1d;\n\t}\n\n\tlocation ~ \\.(svg|ttf|js|css|svgz|eot|otf|woff|jpg|jpeg|gif|png|ico)$ {\n\t\taccess_log off;\n\t\tlog_not_found off;\n\t\texpires max;\n\t}\n}\n```\n\n### Eslint\nThere is a .eslint.yaml config for eslint ready with React plugin.\nTo use it, you need to install additional dependencies though:\n\n```\nnpm install --save-dev eslint eslint-plugin-react\n```\n\nTo do the actual linting, run:\n\n```\nnpm run lint\n```\n\n### Notes on importing css styles\n* styles having /src/ in their absolute path are considered part of the application and exported as local css modules.\n* other styles are considered global styles used by many components and are included in the css bundle directly.\n\n### Contribute\nPlease contribute to the project if you know how to make it better, including this README :)"
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,70 @@
|
|||
{
|
||||
"name": "npm_test_pkg1",
|
||||
"versions": {
|
||||
"1.0.0": {
|
||||
"name": "npm_test_pkg1",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"_id": "npm_test_pkg1@1.0.0",
|
||||
"_npmVersion": "5.1.0",
|
||||
"_nodeVersion": "4.6.1",
|
||||
"_npmUser": {},
|
||||
"dist": {
|
||||
"integrity": "sha512-qq8u/xKpYFCfmANLg5ohY4ZBkzM7NsKjIpYH+eSXji69aceMQvltRXx0O1qo7yAIORiCFsMTGLlkDCQtbhByxg==",
|
||||
"shasum": "d058de16fdf8bde775ef2898e682faacc3eaa67f",
|
||||
"tarball": "http://localhost:4873/npm_test_pkg1/-/npm_test_pkg1-1.0.0.tgz"
|
||||
}
|
||||
},
|
||||
"1.0.1": {
|
||||
"name": "npm_test_pkg1",
|
||||
"version": "1.0.1",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"_id": "npm_test_pkg1@1.0.1",
|
||||
"_npmVersion": "5.1.0",
|
||||
"_nodeVersion": "4.6.1",
|
||||
"_npmUser": {},
|
||||
"dist": {
|
||||
"integrity": "sha512-0YLdKRIAbZJoLpOFqXZE/JldTnGRKjIX999xV4PMJ+sUO6pWiLO8NbG4wuT5738Re3D5WTRa743y9uPvgrTD0A==",
|
||||
"shasum": "1f6251ce59e375a6328958202ec07eb7de38dae6",
|
||||
"tarball": "http://localhost:4873/npm_test_pkg1/-/npm_test_pkg1-1.0.1.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dist-tags": {
|
||||
"latest": "1.0.1"
|
||||
},
|
||||
"time": {
|
||||
"modified": "2017-07-11T18:52:35.061Z",
|
||||
"created": "2017-07-11T18:49:27.417Z",
|
||||
"1.0.0": "2017-07-11T18:49:27.417Z",
|
||||
"1.0.1": "2017-07-11T18:52:35.061Z"
|
||||
},
|
||||
"_distfiles": {},
|
||||
"_attachments": {
|
||||
"npm_test_pkg1-1.0.0.tgz": {
|
||||
"shasum": "d058de16fdf8bde775ef2898e682faacc3eaa67f",
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"npm_test_pkg1-1.0.1.tgz": {
|
||||
"shasum": "1f6251ce59e375a6328958202ec07eb7de38dae6",
|
||||
"version": "1.0.1"
|
||||
}
|
||||
},
|
||||
"_uplinks": {},
|
||||
"_rev": "11-382567c9979db3fd",
|
||||
"readme": "ERROR: No README data found!"
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
"name": "pk1-juan",
|
||||
"versions": {
|
||||
"1.0.0": {
|
||||
"name": "pk1-juan",
|
||||
"version": "1.0.0",
|
||||
"description": "Simple React Webpack Babel Starter Kit",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": {
|
||||
"name": "Juan Picado",
|
||||
"email": "juan@jotadeveloper.com"
|
||||
},
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"angular": "^1.6.8",
|
||||
"angular2": "^2.0.0-beta.21",
|
||||
"babel-core": "^6.26.0",
|
||||
"babel-env": "^2.4.1",
|
||||
"jquery": "^3.2.1",
|
||||
"react": "^16.2.0",
|
||||
"test_npm_18": "^1.0.1",
|
||||
"typescript": "^2.6.2",
|
||||
"verdaccio": "^2.7.2",
|
||||
"verdaccio-memory": "0.0.3",
|
||||
"webpack": "^3.10.0"
|
||||
},
|
||||
"readmeFilename": "README.md",
|
||||
"_id": "pk1-juan@1.0.0",
|
||||
"_npmVersion": "5.5.1",
|
||||
"_nodeVersion": "8.7.0",
|
||||
"_npmUser": {},
|
||||
"dist": {
|
||||
"integrity": "sha512-K3ifqa0DEndma1RPhM83TBVISIY3wq2JdTL0GafvJno6z6JvFBp4iQgyrKn7Yjkd0J/LZ9IJvhNWsGQZuoXMPQ==",
|
||||
"shasum": "5d670df046b9bc4bc1714efe8873a614c522e41d",
|
||||
"tarball": "http://0.0.0.0:4873/pk1-juan/-/pk1-juan-1.0.0.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dist-tags": {
|
||||
"latest": "1.0.0"
|
||||
},
|
||||
"time": {
|
||||
"modified": "2018-01-17T18:27:09.087Z",
|
||||
"created": "2018-01-17T18:27:09.087Z",
|
||||
"1.0.0": "2018-01-17T18:27:09.087Z"
|
||||
},
|
||||
"_distfiles": {},
|
||||
"_attachments": {
|
||||
"pk1-juan-1.0.0.tgz": {
|
||||
"shasum": "5d670df046b9bc4bc1714efe8873a614c522e41d",
|
||||
"version": "1.0.0"
|
||||
}
|
||||
},
|
||||
"_uplinks": {},
|
||||
"_rev": "5-e7a0e845b8b0cdc8",
|
||||
"readme": "# react-webpack-babel\nSimple React Webpack Babel Starter Kit\n\nTired of complicated starters with 200MB of dependencies which are hard to understand and modify?\n\nTry this is a simple [React](https://facebook.github.io/react/), [Webpack](http://webpack.github.io/) and [Babel](https://babeljs.io/) application with nothing else in it.\n\n### What's in it?\n\n* Simple src/index.jsx and src/index.css (local module css).\n* Webpack configuration for development (with hot reloading) and production (with minification).\n* CSS module loading, so you can include your css by ```import styles from './path/to.css';```.\n* Both js(x) and css hot loaded during development.\n* [Webpack Dashboard Plugin](https://github.com/FormidableLabs/webpack-dashboard) on dev server.\n\n### To run\n\n* You'll need to have [git](https://git-scm.com/) and [node](https://nodejs.org/en/) installed in your system.\n* Fork and clone the project:\n\n```\ngit clone https://github.com/alicoding/react-webpack-babel.git\n```\n\n* Then install the dependencies:\n\n```\nnpm install\n```\n\n* Run development server:\n\n```\nnpm start\n```\n\n* Or you can run development server with [webpack-dashboard](https://github.com/FormidableLabs/webpack-dashboard):\n\n```\nnpm run dev\n```\n\nOpen the web browser to `http://localhost:8888/`\n\n### To build the production package\n\n```\nnpm run build\n```\n\n### Nginx Config\n\nHere is an example Nginx config:\n```\nserver {\n\t# ... root and other options\n\n\tgzip on;\n\tgzip_http_version 1.1;\n\tgzip_types text/plain text/css text/xml application/javascript image/svg+xml;\n\n\tlocation / {\n\t\ttry_files $uri $uri/ /index.html;\n\t}\n\n\tlocation ~ \\.html?$ {\n\t\texpires 1d;\n\t}\n\n\tlocation ~ \\.(svg|ttf|js|css|svgz|eot|otf|woff|jpg|jpeg|gif|png|ico)$ {\n\t\taccess_log off;\n\t\tlog_not_found off;\n\t\texpires max;\n\t}\n}\n```\n\n### Eslint\nThere is a .eslint.yaml config for eslint ready with React plugin.\nTo use it, you need to install additional dependencies though:\n\n```\nnpm install --save-dev eslint eslint-plugin-react\n```\n\nTo do the actual linting, run:\n\n```\nnpm run lint\n```\n\n### Notes on importing css styles\n* styles having /src/ in their absolute path are considered part of the application and exported as local css modules.\n* other styles are considered global styles used by many components and are included in the css bundle directly.\n\n### Contribute\nPlease contribute to the project if you know how to make it better, including this README :)"
|
||||
}
|
Binary file not shown.
Loading…
Reference in a new issue