Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • S sweet-core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 62
    • Issues 62
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • sweet-js
  • sweet-core
  • Merge requests
  • !127

add "macros" option to install global macros in compile API

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/jlongster/master into master Nov 20, 2013
  • Overview 28
  • Commits 3
  • Pipelines 0
  • Changes 2

Created by: jlongster

This is a quick tweak to the compile API that lets you pass in additional macros to install globally. This difference between this and simply concat'ing sources is that this generates correct source map information.

I haven't reflected this in sjs.js, which we probably should do. Whatever is passed to -m should probably use this. I'm writing my own Grunt plugin to use it so I just need the lower-level support.

Additionally, in my Grunt plugin I'm automatically adding require('source-map-support').install(); at the beginning of the generated source, which nicely makes node use the sourcemaps in stack traces automatically. It might be worth adding an option to sjs for this as well. (I'll publish my grunt plugin at some point)

Let me know what you think about this, I can continue to tweak this PR based on feedback.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/jlongster/master