@a-la/import
Advanced tools
Comparing version 1.4.0 to 1.4.1
## 22 August 2018 | ||
### 1.4.1 | ||
- [doc] Document `replacement` option. | ||
### 1.4.0 | ||
@@ -4,0 +8,0 @@ |
{ | ||
"name": "@a-la/import", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "À La Regex to transpile an import statement into require.", | ||
@@ -5,0 +5,0 @@ "main": "build", |
@@ -18,2 +18,3 @@ # @a-la/import | ||
* [`ALaImport` Sequence](#alaimport-sequence) | ||
* [Options](#options) | ||
- [Output Example](#output-example) | ||
@@ -66,3 +67,22 @@ - [Lines Preservation](#lines-preservation) | ||
### Options | ||
The transform accepts a single `replacement` option via the `.alamoderc` to be able to substitute the name or path of an imported module. | ||
```json | ||
{ | ||
"env": { | ||
"test-build": { | ||
"import": { | ||
"replacement": { | ||
"from": "^((../)+)src", | ||
"to": "$1build" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
## Output Example | ||
@@ -69,0 +89,0 @@ |
20607
179