1.0.9 • Published 3 years ago

parcel-transformer-inline-source v1.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

parcel-transformer-inline-source

Parcel v2 plugin for an inline any type of files into a html, css and even js files.

Install

npm i parcel-transformer-inline-source --save-dev

Add to .parcelrc

{
  "transformers": { "*": ["...", "parcel-transformer-inline-source"] }
}

How it works

Source:

<!-- index.html -->
Inline script to html
<script>
    <!--=> include("index.js"); -->
</script>

Include other html 
<!--=> include("footer.html"); -->
/* style.css */

/*=> include("someOtherStyles.css"); */
// index.js

// include other js file into current file
/*=> include("other.js"); */

// load file to string 
let code = `/*=> include("../../../../modules/snackbar/index.js"); */`;
1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago