Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

Commit

Permalink
Create package configuration system
Browse files Browse the repository at this point in the history
  • Loading branch information
KSXGitHub committed Mar 4, 2019
1 parent c8c8e65 commit 79837f4
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .pkgcfg.yaml
@@ -0,0 +1,3 @@
scopes:
- null # without scopes, e.g. 'hello-world'
- scope-name # with 'scope-name' scope, e.g. '@scope-name/hello-world'
1 change: 1 addition & 0 deletions tools/pkgcfg/index.d.ts
@@ -0,0 +1 @@
export const scopes: ReadonlyArray<string | null>
11 changes: 11 additions & 0 deletions tools/pkgcfg/index.js
@@ -0,0 +1,11 @@
'use strict'
const path = require('path')
const fs = require('fs')
const yaml = require('js-yaml')
const places = require('@tools/places')
const basename = '.pkgcfg.yaml'
const filename = path.resolve(places.project, basename)
const text = fs.readFileSync(filename, { encoding: 'utf8' })
const pkgcfg = yaml.safeLoad(text)
Object.defineProperty(exports, '__esModule', { value: true })
Object.assign(exports, pkgcfg)
11 changes: 11 additions & 0 deletions tools/pkgcfg/package.json
@@ -0,0 +1,11 @@
{
"name": "@tools/pkgcfg",
"version": "0.0.0",
"private": true,
"dependencies": {
"js-yaml": "^3.12.2",
"@tools/places": "../places",
"@types/js-yaml": "^3.12.0",
"@types/node": "^11.10.4"
}
}
47 changes: 47 additions & 0 deletions tools/pkgcfg/shrinkwrap.yaml
@@ -0,0 +1,47 @@
dependencies:
'@tools/places': 'link:../places'
'@types/js-yaml': 3.12.0
'@types/node': 11.10.4
js-yaml: 3.12.2
packages:
/@types/js-yaml/3.12.0:
dev: false
resolution:
integrity: sha512-UGEe/6RsNAxgWdknhzFZbCxuYc5I7b/YEKlfKbo+76SM8CJzGs7XKCj7zyugXViRbKYpXhSXhCYVQZL5tmDbpQ==
/@types/node/11.10.4:
dev: false
resolution:
integrity: sha512-wa09itaLE8L705aXd8F80jnFpxz3Y1/KRHfKsYL2bPc0XF+wEWu8sR9n5bmeu8Ba1N9z2GRNzm/YdHcghLkLKg==
/argparse/1.0.10:
dependencies:
sprintf-js: 1.0.3
dev: false
resolution:
integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==
/esprima/4.0.1:
dev: false
engines:
node: '>=4'
hasBin: true
resolution:
integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
/js-yaml/3.12.2:
dependencies:
argparse: 1.0.10
esprima: 4.0.1
dev: false
hasBin: true
resolution:
integrity: sha512-QHn/Lh/7HhZ/Twc7vJYQTkjuCa0kaCcDcjK5Zlk2rvnUpy7DxMJ23+Jc2dcyvltwQVg1nygAVlB2oRDFHoRS5Q==
/sprintf-js/1.0.3:
dev: false
resolution:
integrity: sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=
registry: 'https://registry.npmjs.org/'
shrinkwrapMinorVersion: 9
shrinkwrapVersion: 3
specifiers:
'@tools/places': ../places
'@types/js-yaml': ^3.12.0
'@types/node': ^11.10.4
js-yaml: ^3.12.2

0 comments on commit 79837f4

Please sign in to comment.