Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hypervillain/sm-proof-of-concept
https://github.com/hypervillain/sm-proof-of-concept
Last synced: 26 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/hypervillain/sm-proof-of-concept
- Owner: hypervillain
- Created: 2019-12-27T13:14:39.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-11T18:35:02.000Z (about 2 years ago)
- Last Synced: 2024-10-20T00:54:58.701Z (3 months ago)
- Language: JavaScript
- Size: 299 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# sm-proof-of-concept
Proof of concept for an SM project.
How it works:
The package sm-library is a valid SM library. It contains an SM config file and a README.
Everytime a publish is made, a prepublish hook triggers a `bundleApi` script.This script is part of a package called `sm-commons`. Its methods sshould be used by each part of the SM project. It ensures that data remains valid everywhere. The script used here should ensure that every publish made on NPM contains valid data (slice definitions in slices.json)
The package API holds a "fetch" method that takes an npm library name as parameter.
It validates it and then fetches the slice definition path. It returns the array and should store it somewhere.To test it with real data:
```bash
cd packages/api;
node index.js;
open http://localhost:8000/fetch/sm-library```
Note: it doesn't have to be a lerna project ✌️