Comments (6)
I see, I needed to at least export a module like so:
const { ini } = require('mrm-core')
function task() {
ini('.editorconfig', 'editorconfig.org')
.set('_global', { root: true })
.set('*', {
charset: 'utf-8',
end_of_line: 'lf',
indent_size: 2,
indent_style: 'space',
insert_final_newline: true,
tab_width: 2,
trim_trailing_whitespace: true,
})
.set('*.js', {
quote_type: 'single',
})
.save()
}
task.description = 'Adds EditorConfig'
module.exports = task
I'll leave this open, as I don't know if that's the intended behavior or if mrm/src/index.js
is supposed to check before calling module()
. If not, maybe the API examples should be updated?
from mrm-core.
Yeah, you need to export a module from a task. I think we can improve the error message though.
Where did you find this example?
from mrm-core.
https://github.com/sapegin/mrm-core#ini
from mrm-core.
These are API examples, not complete task source.
from mrm-core.
I'm starting to piece that together, yes. The docs, being spread among multiple repos, all with circular referencesโit's a bit disorienting, trying to see the scope of it. That's just my experience however. Feel free to close this.๐
from mrm-core.
Yeah, it's not ideal now, so feel free to improve this ๐พ
from mrm-core.
Related Issues (17)
- Support Node 4? HOT 1
- Utils to work with npm script HOT 1
- Add `delete` for file API HOT 3
- ini: fail to set key into global section HOT 2
- Lines API: add method to insert new line at head of file HOT 4
- Preserve comments in JSON
- Make prettify of ini configurable HOT 5
- [email protected] breaks test case HOT 4
- YML files are changed with updated formatting HOT 2
- Run all tasks flag HOT 2
- The check for pre and post scripts skips prePublishOnly HOT 2
- Make install @latest optionnal HOT 9
- The automated release is failing ๐จ
- Add delete() method to all file types HOT 3
- `copyFiles` remove EOF HOT 3
- Accepting filePath in `packageJson` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mrm-core.