Skip to content

Commit

Permalink
refactor: add pm & fix deps
Browse files Browse the repository at this point in the history
  • Loading branch information
qddegtya committed Dec 26, 2022
1 parent 039559c commit eaff372
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 78 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

*.lock
*-lock.*
5 changes: 5 additions & 0 deletions .pmrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const path = require("path");
module.exports = {
root: path.join(__dirname, "./packages"),
hooks: {},
};
6 changes: 0 additions & 6 deletions lerna.json

This file was deleted.

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"name": "hlang",
"private": true,
"scripts": {
"pm_install": "./node_modules/.bin/pm run install",
"pm_publish": "./node_modules/.bin/pm run publish"
},
"devDependencies": {
"lerna": "^4.0.0"
"@atools/pm": "1.0.x"
}
}
11 changes: 0 additions & 11 deletions packages/parser/README.md

This file was deleted.

14 changes: 7 additions & 7 deletions packages/parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
"name": "@hlang/parser",
"version": "1.0.0",
"description": "parser for hlang",
"author": "archersado <[email protected]>",
"homepage": "https://github.com/HippoStoreExperienceTech/Hlang#readme",
"contributors": [
"archer <[email protected]>",
"archersado <[email protected]>"
],
"homepage": "https://github.com/hlang-org/hlang#readme",
"license": "MIT",
"main": "lib/index.js",
"type": "lib/index.d.ts",
Expand All @@ -19,26 +22,23 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/HippoStoreExperienceTech/Hlang.git"
"url": "git+https://github.com/hlang-org/hlang.git"
},
"scripts": {
"test": "jest --coverage --forceExit",
"build": "tsc -p tsconfig.json",
"lint": "tslint --project . -c tslint.json"
},
"bugs": {
"url": "https://github.com/HippoStoreExperienceTech/Hlang/issues"
"url": "https://github.com/hlang-org/hlang/issues"
},
"dependencies": {
"@hset/hit": "^1.0.4",
"nunjucks": "^3.2.3"
},
"devDependencies": {
"@types/jest": "^27.4.0",
"@types/node": "^17.0.18",
"eslint": "^8.9.0",
"moment": "^2.29.1",
"rxjs": "^7.5.4",
"tslint": "^6.1.3",
"tslint-config-airbnb": "^5.11.2",
"typescript": "^4.5.5"
Expand Down
4 changes: 3 additions & 1 deletion packages/parser/src/parser/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import nunjucks = require('nunjucks');
import { ParamParser, ParamPattern } from '@hset/hit';

// FIXME
import { ParamParser, ParamPattern } from '';
import { getEnv, Env, camelize } from '../utils';
import loadModule from '../module';

Expand Down
47 changes: 1 addition & 46 deletions packages/parser/test/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,46 +1 @@
'use strict';

import build from '../src/build';
import graph from './fixtures/graph';
import * as runScript from 'runscript';


test('test parser', async () => {
const { graphInfo, id } = graph;
const config = {
basePackageInfo: [
{
id: "Core",
metaData: {
npmInfo: {
id: 'Core',
name: '/Users/archersado/workspace/mygit/Hlang/packages/runtime/lib/index.js',
version: "latest",
local: true,
},
cdnInfo: {
id: 'Core',
url: 'https://g.alicdn.cn/xxx',
}
}
},
{
id: "_",
metaData: {
npmInfo: {
id: '_',
name: 'lodash',
version: "latest"
},
cdnInfo: {
id: '_',
url: 'https://cdn.jsdelivr.net/npm/[email protected]/lodash.min.js',
}
}
}
]
}
const entry = await build({ graphInfo, id, options: config });

await runScript(`node ${entry}`);
});
// TODO
11 changes: 5 additions & 6 deletions packages/runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,19 @@
"build": "tsc -p tsconfig.json",
"lint": "tslint --project . -c tslint.json"
},
"author": "archersado <[email protected]>",
"contributors": [
"archer <[email protected]>",
"archersado <[email protected]>"
],
"license": "MIT",
"publishConfig": {
"registry": "https://registry.npm.alibaba-inc.com"
},
"dependencies": {
"assert": "^2.0.0",
"moment": "^2.29.1",
"rxjs": "^6.6.7",
"uuid": "^8.3.2"
},
"devDependencies": {
"@types/jest": "^27.4.1",
"jest": "^27.5.1",
"rxjs": "^6.6.7",
"moment": "^2.29.1",
"ts-jest": "^27.1.3",
"tslint": "^5.11.0",
Expand Down

0 comments on commit eaff372

Please sign in to comment.