Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New plugin plugin-asset-loader #104

Open
wants to merge 1 commit into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/shy-singers-burn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ima/plugin-asset-loader": major
---

New plugin for loading 3rd party (inline/external) assets. This effectively replaces @ima/plugin-style-loader, @ima/plugin-script-loader and @ima/plugin-resource-loader as a drop in replacement, with additional features
20 changes: 20 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions packages/plugin-asset-loader/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*
!dist/**/*
!lib/**/*
!package.json
1 change: 1 addition & 0 deletions packages/plugin-asset-loader/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Change Log
21 changes: 21 additions & 0 deletions packages/plugin-asset-loader/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2016 Seznam.cz a.s.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
30 changes: 30 additions & 0 deletions packages/plugin-asset-loader/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# @ima/plugin-resource-loader

This is the base plugin for loading scripts and styles for the IMA.js application.
You can find the IMA.js skeleton application at <https://github.com/seznam/IMA.js-skeleton>
or follow link <https://imajs.io>.

## Installation

```javascript

npm install @ima/plugin-resource-loader --save

```

```javascript
// /app/build.js

var vendors = {
common: [
'@ima/plugin-resource-loader'
]
};

/*
Now is script loader plugin available as:

import { ResourceLoader } from '@ima/plugin-resource-loader';
*/

```
5 changes: 5 additions & 0 deletions packages/plugin-asset-loader/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const base = require('../../jest.config.base.js');

module.exports = {
...base,
};
40 changes: 40 additions & 0 deletions packages/plugin-asset-loader/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "@ima/plugin-asset-loader",
"version": "1.0.0",
"description": "Seznam IMA.js plugin for loading web assets and resources",
"main": "./dist/cjs/main.js",
"module": "./dist/esm/main.js",
"types": "./dist/esm/main.d.ts",
"scripts": {
"test": "../../node_modules/.bin/jest --coverage --no-watchman --config=jest.config.js",
"build": "ima-plugin build",
"dev": "ima-plugin dev",
"link": "ima-plugin link",
"lint": "eslint './**/*.{js,jsx,ts,tsx,mjs}'"
},
"keywords": [
"IMA.js",
"Web resource loader",
"Module",
"Javascript"
],
"author": "Jan Šimeček <[email protected]>",
"repository": {
"type": "git",
"url": "https://github.com/seznam/IMA.js-plugins.git"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/",
"access": "public"
},
"bugs": {
"url": "https://github.com/seznam/IMA.js-plugins/issues"
},
"license": "MIT",
"peerDependencies": {
"@ima/core": ">=18.0.0 || >=19.0.0-rc.0"
},
"dependencies": {
"easy-uid": "^2.0.2"
}
}
Loading