Skip to content
πŸ“¦ Store your configs in one place and share between projects without any pain
JavaScript HTML CSS Other
Branch: master
Clone or download
Latest commit 91525c7 Aug 8, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
packages v2.9.0-beta Aug 8, 2019
public
.editorconfig feat(sharec): setting inject status on success May 11, 2019
.gitignore feat: write up library core Apr 5, 2019
.travis.yml feat(sharec): add collector module and extract fs utils to module May 28, 2019
LICENSE chore: add license file Jun 2, 2019
README.md docs: add missing notes about sharec installation Jul 23, 2019
appveyor.yml feat(sharec): add collector module and extract fs utils to module May 28, 2019
greenkeeper.json chore: add Greenkeeper config file May 11, 2019
lerna.json v2.9.0-beta Aug 8, 2019
package-lock.json refactor(sharec): simplify files structure and project architecture Jul 13, 2019
package.json chore: move eslint and prettier from root to each package Jul 7, 2019

README.md

Sharec Build Status Build status

Sharec logo by Ivashkina Xenia

Sharec – is a new minimalistic tool for boilerplating and configuration versioning, which can copy, merge and delete files.

You can use that tool for share and management bloat configuration between different projects, keep your code up to date and starts new projects in one command.

  • Integrity. Pack all your configs in the one package and save time on support.
  • Distribution. Publish configuration with npm or distribute it via repositories.
  • Simplicity. Install packages just as dependency and forget about headache related to configs.

Usage

  1. Create configuration project and init npm inside.
  2. Install sharec as dependency:
npm add sharec
  1. Add posintall and uninstall scripts to root package.json file:
"scripts": {
  "postinstall": "sharec install",
  "preuninstall": "sharec remove"
}
  1. Create configs directory.
  2. Place some configuration files to the created configs directory.
  3. Create package.json file inside configs directory and add required dependencies for tool what you need.
  4. Publish configuration with npm publish command or just push it.
  5. Install it wherever you want with npm install command.

If you want read more detailed manual – look at official demo config and check sharec package if you looking for API reference.

Example

With sharec you can transform this:

{
  "name": "my-awesome-project",
  "version": "1.0.0",
  "scripts": {
    "start": "NODE_ENV=development ./dev",
    "build": "rimraf dist && NODE_ENV=production ./build",
-   "eslint": "eslint ./src/**/*.js"
  },
- "husky": {
-   "hooks": {
-     "pre-commit": "lint-staged"
-   }
- },
- "lint-staged": {
-   "src/**/*.js": [
-     "eslint",
-     "prettier --write",
-     "git add"
-   ]
- },
- "browserslist": [
-   "last 2 version",
-   "> 1%"
- ],
- "babel": {
-   "presets": [
-     "@babel/preset-env"
-   ]
- },
- "prettier": {
-   "singleQuote": true,
-   "semi": false
- },
- "jest": {
-   "testURL": "http://localhost/",
-   "moduleNameMapper": {
-     "^src/(.*)$": "<rootDir>/src/$1"
-   }
- },
- "eslintConfig": {
-   "parser": "babel-eslint",
-   "env": {
-     "browser": true,
-     "es6": true,
-     "node": true,
-     "jest": true
-   },
-   "extends": "standard",
-   "rules": {
-     "space-before-function-paren": 0
-   },
-   "parserOptions": {
-     "ecmaVersion": 8,
-     "ecmaFeatures": {
-       "spread": true
-     },
-     "sourceType": "module"
-   }
- },
- "eslintIgnore": [
-   "/node_modules",
-   "/dist"
- ],
  "devDependencies": {
-   "@babel/core": "^7.0.1",
-   "@babel/preset-env": "^7.0.0",
-   "babel-core": "7.0.0-bridge.0",
-   "babel-eslint": "^10.0.0",
-   "babel-jest": "^23.6.0",
-   "eslint": "^5.6.0",
-   "eslint-config-standard": "^12.0.0",
-   "eslint-plugin-import": "^2.9.0",
-   "eslint-plugin-node": "^9.0.0",
-   "eslint-plugin-promise": "^4.0.1",
-   "eslint-plugin-standard": "^4.0.0",
-   "husky": "^2.0.0",
-   "lint-staged": "^8.0.4",
-   "prettier": "^1.11.1"
  }
}

To this:

{
  "name": "my-awesome-project",
  "version": "1.0.0",
  "scripts": {
    "start": "NODE_ENV=development ./dev",
    "build": "rimraf dist && NODE_ENV=production ./build",
  },
  "devDependencies": {
+    "my-awesome-config": "1.0.0"
  }
}
You can’t perform that action at this time.