1.0.9 • Published 2 years ago

parcel-transformer-inline-source v1.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
2 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

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago