Git Product home page Git Product logo

Comments (6)

 avatar commented on June 11, 2024

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.

sapegin avatar sapegin commented on June 11, 2024

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.

 avatar commented on June 11, 2024

https://github.com/sapegin/mrm-core#ini

from mrm-core.

sapegin avatar sapegin commented on June 11, 2024

These are API examples, not complete task source.

from mrm-core.

 avatar commented on June 11, 2024

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.

sapegin avatar sapegin commented on June 11, 2024

Yeah, it's not ideal now, so feel free to improve this ๐Ÿ‘พ

from mrm-core.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.