Set package's main and re-export the utilities at it.
This commit is contained in:
parent
251f55538b
commit
3393883c52
|
@ -1,11 +1,12 @@
|
|||
{
|
||||
"name": "userstyles",
|
||||
"description": "A collection of all my userstyles for various websites.",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"author": "Bauke <me@bauke.xyz>",
|
||||
"homepage": "https://bauke.xyz/userstyles",
|
||||
"repository": "https://git.holllo.cc/Bauke/userstyles",
|
||||
"license": "MIT",
|
||||
"main": "source/index.js",
|
||||
"scripts": {
|
||||
"start": "nodemon 'source/index.js' --watch 'source/' --ext 'scss'",
|
||||
"build": "USERSTYLE_ENV='production' node 'source/index.js'",
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
const {promises: fsp} = require('fs');
|
||||
const {join} = require('path');
|
||||
|
||||
const {createUserstyle} = require('./utilities');
|
||||
const {
|
||||
createUserstyle,
|
||||
readStyleMetadata,
|
||||
styleHasImages
|
||||
} = require('./utilities');
|
||||
|
||||
async function main() {
|
||||
// Make sure the `build/` directory exists.
|
||||
|
@ -23,7 +27,11 @@ const styles = ['tildes-baukula', 'tildes-compact'];
|
|||
// Export the `main()` function as `build()` for external use.
|
||||
module.exports = {
|
||||
build: main,
|
||||
styles
|
||||
styles,
|
||||
// Utilities.
|
||||
createUserstyle,
|
||||
readStyleMetadata,
|
||||
styleHasImages
|
||||
};
|
||||
|
||||
// Run `main()` if this script was called directly (like `node source/index.js`).
|
||||
|
|
Loading…
Reference in New Issue