1.1.0 • Published 1 year ago

@worlduniting/includerjs v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

IncluderJS

A bare bones module for including files in other files.

Use

@include "file"

About

IncluderJS's entry is a single file, srcDoc. All includes are processed from the beginning to the end of the document. Contents from each included file are spliced into the source document. All includes must be in the the srceDir.

  • IncluderJS is built using ES Modules

your-library.js

import includerJS from 'includerJS'

const srcDir = "path/to/files/"
const srcDoc = "initialFile"

const processedDoc = includerJS(srcDoc, { basePath: srcDir });

initial-file.md (using markdown as the example, but you can use anything)

This is some text content in your srcDoc.

@include "another-file.md"

another-file.md

This is some other content that will be spliced in and replace the include statement

'resulting-file.md'

This is some text content in your srcDoc.

This is some other content that will be spliced in and replace the include statement
ansi-escapesansi-stylesansi-regexanymatchbabel-jestargparsebabel-plugin-jest-hoistbabel-plugin-istanbulbabel-preset-current-node-syntaxbabel-preset-jestbalanced-matchbrace-expansionbracesbserbrowserslistbuffer-fromcallsitescamelcasecaniuse-litechar-regexchalkci-infocjs-module-lexercliuicollect-v8-coveragecocolor-convertcolor-nameconcat-mapcross-spawnconvert-source-mapdebugdedentdeepmergedetect-newlinediff-sequenceselectron-to-chromiumemitteryemoji-regexescaladeerror-exescape-string-regexpesprimaexecaexpectexitfast-json-stable-stringifyfb-watchmanfill-rangefind-upfseventsgensyncfs.realpathfunction-bindget-caller-fileget-package-typeget-streamglobglobalsgraceful-fshashas-flaghtml-escaperhuman-signalsimport-localimurmurhashinflightinheritsis-arrayishis-core-moduleis-fullwidth-code-pointis-generator-fnis-numberis-streamisexeistanbul-lib-coverageistanbul-lib-instrumentistanbul-lib-reportistanbul-lib-source-mapsistanbul-reportsjest-changed-filesjest-circusjest-clijest-configjest-diffjest-docblockjest-eachjest-environment-nodejest-get-typejest-haste-mapjest-leak-detectorjest-matcher-utilsjest-message-utiljest-mockjest-pnp-resolverjest-regex-utiljest-resolvejest-resolve-dependenciesjest-runnerjest-runtimejest-snapshotjest-utiljest-validatejest-watcherjest-workerjs-tokensjs-yamljsescjson-parse-even-better-errorsjson5kleurlevenlines-and-columnslocate-pathlru-cachemake-dirmakeerrormerge-streamminimatchmicromatchmsmimic-fnnatural-comparenode-int64node-releasesnormalize-pathnpm-run-pathonceonetimep-limitp-locatep-tryparse-jsonpath-existspath-is-absolutepath-keypath-parsepicomatchpicocolorspiratespkg-dirpretty-formatpromptspure-randreact-isrequire-directoryresolveresolve-cwdresolve-fromresolve.exportssemvershebang-commandshebang-regexsignal-exitsisteransislashsource-mapsource-map-supportsprintf-jsstack-utilsstring-lengthstring-widthstrip-ansistrip-bomstrip-final-newlinestrip-json-commentssupports-colorsupports-preserve-symlinks-flagtest-excludetmplto-fast-propertiesto-regex-rangetype-detecttype-festupdate-browserslist-dbv8-to-istanbulwalkerwhichwrap-ansiwrappywrite-file-atomicy18nyallistyargsyargs-parseryocto-queue
1.1.0

1 year ago

1.0.0

1 year ago