diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..c6822a3 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,31 @@ +version: 2.1 + +executors: + node-docker-executor: + docker: + - image: cimg/node:18.20.4-browsers + working_directory: ~/project + +jobs: + # Job to publish to npm + npm-publish: + executor: node-docker-executor + steps: + - checkout + - run: + name: Install dependencies + command: yarn install # Ensure all dependencies are installed, including webpack + - run: + name: Set Up npm Credentials + command: | + echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" > ~/.npmrc + - run: + name: Publish to npm + command: | + npm publish + +workflows: + version: 2 + publish: + jobs: + - npm-publish \ No newline at end of file diff --git a/.eslintignore b/.eslintignore index e69de29..2e1fa2d 100644 --- a/.eslintignore +++ b/.eslintignore @@ -0,0 +1 @@ +*.md \ No newline at end of file diff --git a/.gitignore b/.gitignore index 12cddb2..f51c73f 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ # IDE .vscode +.idea # Lib /dist diff --git a/README.md b/README.md index a9021f3..afc5f72 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# @modusbox/microfrontend-utils +# @pm4ml/microfrontend-utils A collection of Typescript utilities for the frontend apps. -To install the module run `yarn add @modusbox/microfrontend-utils`. +To install the module run `yarn add @pm4ml/microfrontend-utils`. -Documentation is available at [https://modusintegration.github.io/microfrontend-utils](https://modusintegration.github.io/microfrontend-utils) +Documentation is available at [https://github.com/pm4ml/microfrontend-utils](https://github.com/pm4ml/microfrontend-utils) ### Development diff --git a/package.json b/package.json index 3562a43..06c6d9d 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "@modusbox/microfrontend-utils", - "version": "0.0.3", + "name": "@pm4ml/microfrontend-utils", + "version": "0.0.5", "main": "lib/index.js", - "license": "MIT", + "license": "Apache-2.0", "author": "Ivan Annovazzi ", "types": "lib/index.d.ts", "files": [ @@ -11,6 +11,9 @@ "dependencies": { "lodash": "^4.17.21" }, + "publishConfig": { + "access": "public" + }, "devDependencies": { "@babel/core": "^7.13.16", "@babel/preset-env": "^7.13.15", diff --git a/src/README.md b/src/README.md index 174ad7f..1257ccb 100644 --- a/src/README.md +++ b/src/README.md @@ -1,34 +1,34 @@ -# @modusbox/microfrontend-utils +# @pm4ml/microfrontend-utils A collection of Typescript utilities for the frontend apps. ### Installation -To install the module simply run `yarn add @modusbox/microfrontend-utils`. +To install the module simply run `yarn add @pm4ml/microfrontend-utils`. ### Usage ```ts // import everything -import * as utils from '@modusbox/microfrontend-utils'; +import * as utils from '@pm4ml/microfrontend-utils'; await utils.async.sleep(10); // import all from module -import * as async from '@modusbox/microfrontend-utils/lib/async'; +import * as async from '@pm4ml/microfrontend-utils/lib/async'; await async.sleep(10); -// import from module as named export -import { sleep } from '@modusbox/microfrontend-utils/lib/async'; +// import from module as named export +import { sleep } from '@pm4ml/microfrontend-utils/lib/async'; await sleep(10); // import a single utility -import sleep from '@modusbox/microfrontend-utils/lib/async/sleep'; +import sleep from '@pm4ml/microfrontend-utils/lib/async/sleep'; await sleep(10); // import a type -import { TextFileContent } from '@modusbox/microfrontend-utils/lib/file'; +import { TextFileContent } from '@pm4ml/microfrontend-utils/lib/file'; ``` Modules available: -- [async](./async/README.md) \ No newline at end of file +- [async](./async/README.md)