open-index/open-npm huggingface dataset:
npm package: @smadey/x-loader
Description: JS/CSS/Assets/Library Loader
Latest version: 0.1.1

# load-lib

JS/CSS/Assets/Library Loader use:

* [scriptjs](https://github.com/ded/script.js) —  is an asynchronous JavaScript loader.
* [loadCSS](https://github.com/filamentgroup/loadCSS) — A function for loading CSS asynchronously

## Install
```sh
npm install --save x-loader
```

## Usage

```js
import xLoader from 'x-loader';

xLoader.css([
  'https://cdn.jsdelivr.net/npm/element-ui@2.4.8/lib/theme-chalk/index.css'
], () => {
  console.log('css loaded');
});

xLoader.js([
  'https://cdn.jsdelivr.net/npm/element-ui@2.4.8/lib/index.js'
], () => {
  console.log('js loaded');
});

xLoader.assets([
  'https://cdn.jsdelivr.net/npm/element-ui@2.4.8/lib/theme-chalk/index.css',
  'https://cdn.jsdelivr.net/npm/element-ui@2.4.8/lib/index.js'
], () => {
  console.log('assets loaded');
});

xLoader.lib('ELEMENT', [
  'https://cdn.jsdelivr.net/npm/element-ui@2.4.8/lib/theme-chalk/index.css',
  'https://cdn.jsdelivr.net/npm/element-ui@2.4.8/lib/index.js'
], (ELEMENT) => {
  console.log(ELEMENT);
});
```
*Note: support Promise format*


## Options

```js
xLoader.js(srcs, callback);
```

`srcs` - javascript src array

`callback` - loaded callback

```js
xLoader.css(hrefs, callback);
```

`hrefs` - css href array

`callback` - loaded callback

```js
xLoader.assets(assets, callback);
```

`assets` - javascript src & css href array

`callback` - loaded callback

```js
xLoader.lib(name, assets, callback);
```

`name` - library name

`assets` - library assets

`callback` - callback with library


## License

[MIT](LICENSE).
npm package: @smag-web-front/smag-web-legacy-vue-components
Description: ## Project setup
Latest version: 0.14.1-32

# smag.web.legacy.vue.components

## Project setup

You need to create an access token on your Gitlab user : https://docs.gitlab.com/ee/user/packages/npm_registry/#authenticate-with-a-personal-access-token-or-deploy-token

```
npm config set //gitlab.infra.smag.tech/api/v4/packages/npm/:_authToken $YOUR_TOKEN
npm install
```

## Project setup with docker

The dev stack of this project is using docker

### Create and start the stack

```
cd docker
bash stack.sh dev up -d
```

### Enter in the docker stack

```
docker exec -ti web_legacy_vue_components sh
```

### Exit the docker stack

```
exit
```

### Remove the stack

```
cd docker
bash stack.sh dev down
```

### Stop the running stack

```
cd docker
bash stack.sh dev stop
```

### Start the stopped stack

```
cd docker
bash stack.sh dev start
```

## Commands

Following commands must be run from the docker stack

### Compiles and hot-reloads for development

```
npm run serve
```

### Compiles and minifies for production

```
npm run build
```

### Run your unit tests

```
npm run test
```

### Run your build on localhost

For accessing to the built files from a local URL

```
npm run preview
```

## Docker setup for development

Copy the .env.example file and rename it to .env.local
Replace $MY_TOKEN by your real token (See Project setup)

```
docker-compose up
```