|
1 | 1 | # ☄️ Config Curator |
2 | 2 |
|
3 | | -[](https://www.npmjs.com/package/@rxrc/curator) |
4 | | -[](https://github.com/razor-x/config-curator) |
| 3 | +[](https://www.npmjs.com/package/config-curator) |
| 4 | +[](https://github.com/razor-x/config-curator/actions/workflows/main.yml) |
5 | 5 |
|
6 | 6 | **CLI tool for installing static configuration or dotfiles.** |
7 | 7 |
|
|
52 | 52 | 1. Add this as a development dependency to your project using [npm] with |
53 | 53 |
|
54 | 54 | ``` |
55 | | - $ npm install --save-dev @rxrc/curator |
| 55 | + $ npm install --save-dev config-curator |
56 | 56 | ``` |
57 | 57 |
|
58 | 58 | 2. Add a [script][npm scripts] to your `package.json` with `"curator": "curator"` |
@@ -86,9 +86,7 @@ and run the `curator` command to install the configuration. |
86 | 86 | ```js |
87 | 87 | /* manifest.js */ |
88 | 88 |
|
89 | | -'use strict' |
90 | | -
|
91 | | -const os = require('os') |
| 89 | +import os from 'os' |
92 | 90 |
|
93 | 91 | const targetRoot = os.homedir() |
94 | 92 |
|
@@ -135,35 +133,39 @@ const symlinks = [ |
135 | 133 | } |
136 | 134 | ] |
137 | 135 |
|
138 | | -module.exports = { targetRoot, unlinks, directories, files, symlinks } |
| 136 | +export default { |
| 137 | + targetRoot, |
| 138 | + unlinks, |
| 139 | + directories, |
| 140 | + files, |
| 141 | + symlinks |
| 142 | +} |
139 | 143 | ``` |
140 | 144 |
|
141 | 145 | #### Complete manifest API |
142 | 146 |
|
143 | 147 | ```js |
144 | 148 | /* manifest.js */ |
145 | 149 |
|
146 | | -'use strict' |
| 150 | +import os from 'os' |
147 | 151 |
|
148 | 152 | /* Prefix for all source paths |
149 | 153 | * except for unlinks and symlinks which use targetRoot below. |
150 | 154 | * |
151 | | - * Use __dirname to refer to the location of this file |
152 | | - * and process.cwd() for the current working directory. |
| 155 | + * Use process.cwd() for the current working directory. |
153 | 156 | * |
154 | 157 | * Default: the current working directory. |
155 | 158 | */ |
156 | | -const originRoot = require('os').homedir() |
| 159 | +const originRoot = os.homedir() |
157 | 160 |
|
158 | 161 | /* Prefix for all destination paths. |
159 | 162 | * For unlinks and symlinks, the source is also prefixed. |
160 | 163 | * |
161 | | - * Use __dirname to refer to the location of this file |
162 | | - * and process.cwd() for the current working directory. |
| 164 | + * Use process.cwd() for the current working directory. |
163 | 165 | * |
164 | 166 | * Default: a ./dest folder under the current working directory. |
165 | 167 | */ |
166 | | -const targetRoot = require('os').homedir() |
| 168 | +const targetRoot = os.homedir() |
167 | 169 |
|
168 | 170 | /* Package lookup backend to use: |
169 | 171 | * pacman, dpkg, homebrew, pkgng, or noop. |
@@ -334,7 +336,7 @@ const symlinks = [ |
334 | 336 | * or async function that returns the plain object. |
335 | 337 | * Simply do not export an option to use the default. |
336 | 338 | */ |
337 | | -module.exports = { |
| 339 | +export default { |
338 | 340 | unlinks, |
339 | 341 | directories, |
340 | 342 | files, |
|
0 commit comments