Giter VIP home page Giter VIP logo

skpm's Introduction

skpm - Sketch Plugin Manager


A utility to create, build and publish sketch plugins.

Installation

Important: Node.js > V6.x is a minimum requirement. You also need the command line tools installed.

npm install -g skpm

Usage

skpm create my-plugin

The above command pulls the template from skpm/skpm, prompts for some information, and generates the project at ./my-plugin/.

Create a new plugin

skpm create <plugin-name>

--name        The plugin display name.
--cwd         A directory to use instead of $PWD.
--force       Force option to create the directory for the new app. [boolean] [default: false]
--template    The repository hosting the template to start from.    [string]  [default: skpm/skpm]
--git         Initialize version control using git.                 [boolean] [default: true]
--install     Installs dependencies.                                [boolean] [default: true]
A note on templates

The purpose of official skpm plugin templates are to provide opinionated development tooling setups so that users can get started with actual plugin code as fast as possible. However, these templates are un-opinionated in terms of how you structure your plugin code and what libraries you use in addition to skpm.

Current available official templates include:

πŸ’ Tip: Any Github repo with a 'template' folder can be used as a custom template: skpm create <project-name> --template=<username>/<repository>

Build the plugin

Once the installation is done, you can run some commands inside the project folder:

npm run build

To watch for changes:

npm run watch

Additionally, if you wish to run the plugin every time it is built:

npm run start

View the plugin's log

To view the output of your console.log, you have a few different options:

  • Use the sketch-dev-tools
  • Open Console.app and look for the sketch logs
  • Look at the ~/Library/Logs/com.bohemiancoding.sketch3/Plugin Output.log file

Skpm provides a convenient way to do the latter:

skpm log

  -f, -F        The `-f` option causes tail to not stop when end of file is
                reached, but rather to wait for additional data to be appended
                to the input.                       [boolean] [default: "false"]
  --number, -n  Shows `number` lines of the logs.                       [number]

Publish the plugin on the registry

To publish a new version of the plugin to the registry:

skpm publish <new-version> | major | minor | patch | premajor | preminor | prepatch | prerelease

  --repo-url          Specify the repository URL (default to the one specified
                      in package.json).                                 [string]
  --skip-release      Do not create a release on GitHub.com.           [boolean]
  --open-release, -o  Open the newly created release on GitHub.com.    [boolean]
  --skip-registry     Do not publish to the plugins registry if not already
                      present.                                         [boolean]
  --download-url      Specify the new version's download URL (default to the
                      asset of the release created on GitHub.com).      [string]

The exact order of execution (without options) is as follows:

  • Run the preversion script
  • Bump version in package.json as requested (patch, minor, major, etc).
  • Run the version script
  • Commit and tag
  • Run the postversion script.
  • Run the prepublish or build script
  • Zip the folder specified in the main field
  • Create a draft release on GitHub
  • Upload the zip to GitHub
  • Publish the release
  • Remove the zip
  • Check the sketchplugins/plugin-directory repo to see if the plugin is already there. If not, open a PR to add it.

License

MIT

skpm's People

Contributors

afc163 avatar andarist avatar bomberstudios avatar damianprzygodzki avatar danielruf avatar gerrit avatar griffin-stewie avatar idriesalbender avatar jemgold avatar kannonboy avatar lizheming avatar macintoshhelper avatar marionebl avatar mathieudutour avatar mcansh avatar mrpeak avatar oskarols-phrase avatar pez avatar pratyushtewari avatar razzwan avatar robintindale avatar romansp avatar sawa-zen avatar stwind avatar thecalvinchan avatar tomquirk avatar weizhenye avatar wellmonge avatar yuanqing avatar zehfernandes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

skpm's Issues

Few issues during setup

Disclaimer: aint so good at this coding thing :)
I got a few errors while testing this. Not sure if I'm following the steps as intended. Here's what I did:

  1. Created a new folder pluginTest, not in the sketch plugins folder
  2. Ran skpm init
  3. Ran skpm build, and got this error:

Error: ENOENT: no such file or directory, mkdir '/Users/aminnassiri/Projects/pluginTest/plugin.sketchplugin/Contents/Sketch'

  1. Added the folders manually and ran skpm build again. Got this error:

error Error while building ./my-command.js
{ SyntaxError: /Users/aminnassiri/Projects/pluginTest/src/my-command.js: Unterminated string constant (2:31)
1 | export default function (context) {
2 | context.document.showMessage('It's alive πŸ™Œ')

  1. Changed the string and ran skpm build again. Worked this time.
  2. Installed the plugin and tested it. Works!
  3. Ran the skpm link and got this error:

Amins-MBP:pluginTest aminnassiri$ skpm link /Users/aminnassiri/Library/Application\ Support/com.bohemiancoding.sketch3/Plugins
error Error while reading the package.json file
{ Error: Cannot find module '/Users/aminnassiri/Projects/pluginTest/Users/aminnassiri/Library/Application Support/com.bohemiancoding.sketch3/Plugins/package.json'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (/usr/local/lib/node_modules/skpm/lib/skpm-link.js:24:17)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3) code: 'MODULE_NOT_FOUND' }

Getting error "Can't find variable: exports" in WebUI after updating to 0.7.2

After updating to the latest version, I'm getting the following JS console error when opening up a WebUI view:

ReferenceError: Can't find variable: exports

I've gone through a few of the previous commits, and the last commit that successfully compiles is be946f4f656cb83c9e6387978b1ca40670d292af.

Should I change how my Resource files are getting compiled? Would appreciate some direction on this so I can use the latest code.

Missing "name" field in the package.json?

I'm trying to use the skpm publish feature, and I'm getting this error:

error Missing "name" field in the package.json

There's definitely a name field in package.json (I've also tried setting it in skpm.name in package.json, and in manifest.json).

I'm probably doing something wrong, but there's not a lot of documentation on the publish section.

Thanks in advance!

cant push the tag

I have yarn and npm set up so they dont use the 'v' prefix on releases and that causes skpm to not be able to push the tag for obvious reasons as it cant find 'v1.0.1'

Adding 'plugins' to user-defined webpack config produces incorrect build output for commands

Looking through skpm sources I figured out that I can use my own webpack.config.js to augment included skpm's webpack config.

I was playing around this feature and stumbled upon pretty weird case when I add custom plugins into webpack config.

Though build finishes successfully and my plugins are applied, output command scripts appear wrapped multiple times into run function (by WebpackHeaderFooterPlugin), moreover commands from different "script" are included (I have multiple "script"s defined in "manifest.json"). If you try to run it from Sketch, it will crash with an exception: Exception: TypeError: undefined is not an object (evaluating that.context = context).

I guess that's caused by the following in webpackConfig.js:

let plugins = userDefinedWebpackConfig.plugins || []

My guess is that when multiple "script" files are run through 'webpack' userDefinedWebpackConfig.plugins becomes mutated.

Changing it to let plugins = [...userDefinedWebpackConfig.plugins] || [] did indeed fixed that.

I can provide a PR that introduces exactly that change, or can provide with repro case for you to look around.

'babel-polyfill' missing

Need 'babel-polyfill' to provide "regeneratorRuntime" function, when using "co" or "async-await" function

Add `--watch` command info to README

Would be curious to hear your opinions on implementing a watch command. My initial thoughts for the workflow would be:

  1. Within an initialized project, run the skpm watch command
  2. skpm would then listen for all changes within the src (and Resources?) directory. Alternatively the user could set a watch_glob (or something similar) within the package.json?
  3. When a change is detected, it would essentially run the skpm build and skpm link commands.
  4. The changes would now be reflected within Sketch.

My main motivation for this request is to be able to make a change and have that change immediately reflected within Sketch. This seems like a much better workflow compared to running skpm build and skpm link manually after each change.

Do you have any thoughts or opinions on the above? Does this functionality already exist and I'm just missing it?

Thanks.

Unexpected token

I am using react-sketchapp library in order to generate some sketch files. Following their example if I run npm run render after npm install below is what I get.

I installed skpm separately npm install -g skpm to make sure it's installed globally as well.

Appreciate any directions.

> [email protected] render /Users/ikaplan/Desktop/react-sketchapp/examples/colors
> skpm build --watch --run

/Users/ikaplan/Desktop/react-sketchapp/examples/colors/node_modules/skpm/lib/utils/getSketchVersion.js:11
  .then(function ({ stdout, stderr }) {
                  ^

SyntaxError: Unexpected token {
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/Users/ikaplan/Desktop/react-sketchapp/examples/colors/node_modules/skpm/lib/skpm-build.js:11:24)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)

npm ERR! Darwin 16.7.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "render"
npm ERR! node v4.4.7
npm ERR! npm  v2.15.8
npm ERR! code ELIFECYCLE
npm ERR! [email protected] render: `skpm build --watch --run`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] render script 'skpm build --watch --run'.
npm ERR! This is most likely a problem with the colors package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     skpm build --watch --run
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs colors
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls colors
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/ikaplan/Desktop/react-sketchapp/examples/colors/npm-debug.log

`skpm init <template>` not preserving dependencies

Ran

$ skpm init git+ssh://[email protected]:jongold/react-sketchapp-skpm-example.git
....
$ yarn

package.json is as follows:

{
	"name": "test-skpm-init",
	"version": "1.0.0",
	"main": "plugin.sketchplugin",
	"scripts": {
		"test": "echo \"Error: no test specified\" && exit 1",
		"build": "skpm build",
		"watch": "skpm build --watch",
		"link": "skpm link",
		"publish": "skpm publish"
	},
	"author": "",
	"license": "ISC",
	"description": "",
	"manifest": "src/manifest.json",
	"devDependencies": {
		"babel-preset-es2015": "^6.22.0",
		"babel-preset-react": "^6.22.0",
		"eslint": "^3.17.1",
		"eslint-config-airbnb": "^14.1.0",
		"eslint-plugin-import": "^2.2.0",
		"eslint-plugin-jsx-a11y": "^4.0.0",
		"eslint-plugin-react": "^6.10.0",
		"skpm": "^0.5.0"
	}
}

Would be much nicer if they were preserved deps so it works out of the box:

https://github.com/jongold/react-sketchapp-skpm-example/blob/master/package.json

Can't use `require` method for importing modules

This is likely an issue with my own babel setup, but when using an external npm module (in this case xml2js), I'm getting the following error:

<Error>: ReferenceError: Can't find variable: require.
	Plugin β€œ[Plugin Name]”, line 47:
	Β» var Util = _interopDefault(require('util'));
2017-04-06 15:57:02.173 Sketch[15619:8424183] Exception: {
    column = 35;
    line = 47;
}

This same error happens any time I use a module that uses the require method of importing modules. Here's my .babelrc:

{
  presets: [
    ["es2015", {modules: false}],
    "react",
  ],
  plugins: [
    "external-helpers",
    "transform-react-jsx",
  ],
}

I imagine I'm missing something obvious here... the es2015 preset should do the conversion, shouldn't it?

Thanks.

does not watch the package.json and manifest.json

It's not clear in the docs whether an edit on any of the JSON files in a project should trigger a rebuild when using skpm build --watch, and I'm not sure if that's a bug or a feature : )

  • watch package.json
  • watch manifest.json

updating the plugin during development

After a code change and running the build command, how would I go about updating the locally installed plugin?

I ran the link command and I can see the symlink in sketch plugin folder. Not sure what's the purpose of this command.

running babel on node_modules

Hi,

I am working on a react-sketchapp project that uses skpm. One of the node modules I am using has ES.next syntax that isn't getting recognized during compilation (skpm build --watch --run):
the equals sign after static propTypes.

I have included a .babelrc file at the root of my project with the following settings, per suggestions from here & here:

{
  "presets": ["es2015", "react", "stage-0"],
  "plugins": ["transform-runtime", "transform-class-properties"]
}

Does skpm ignore the node_modules folder? If so, how can I change that? A full repo where the issue can be reproduced is available here.

Support action handlers

My manifest.json uses action handlers like this:

    …
    "commands": [
        {
            "name": "Artboard Manager",
            "identifier": "artboardmanager",
            "script": "./artboard-manager.js",
            "handlers" : {
                "actions": {
                    "ArtboardChanged.finish": "ArtboardChanged",
                    "LayersMoved.finish": "LayersMoved",
                    "Duplicate.finish": "Duplicate",
                    "HandlerLostFocus": "Resize",
                    "ResizeArtboardToFit": "ResizeArtboardToFit"
                }
            }
        },
    …

Currently, building a plugin will only create a handler for the onRun event. As a workaround, I am creating a new dummy command for each action I want to trigger:

        {
            "script" : "./artboard-manager.js",
            "name" : "Artboard Manager - ArtboardChanged",
            "handler" : "ArtboardChanged",
            "identifier" : "artboardmanager.artboardchanged"
        },
        {
            "script" : "./artboard-manager.js",
            "name" : "Artboard Manager - LayersMoved",
            "handler" : "LayersMoved",
            "identifier" : "artboardmanager.layersmoved"
        },
        {
            "script" : "./artboard-manager.js",
            "name" : "Artboard Manager - Duplicate",
            "handler" : "Duplicate",
            "identifier" : "artboardmanager.duplicate"
        },
        {
            "script" : "./artboard-manager.js",
            "name" : "Artboard Manager - Resize",
            "handler" : "Resize",
            "identifier" : "artboardmanager.resize"
        },
        {
            "script" : "./artboard-manager.js",
            "name" : "Artboard Manager - ResizeArtboardToFit",
            "handler" : "ResizeArtboardToFit",
            "identifier" : "artboardmanager.ResizeArtboardToFit"
        }

but it would be nice if skpm supported action handlers out of the box.

Include the Resources folder with "--watch --run"

For the case when we run skpm build --watch --run would be good if the plugin could be launched again without actually re-building it.

This is useful for the case the plugin uses either external commands from the assets folder and any change to this command would be run again.

Thank you

skpm link not working

The skpm link command isn't working at all for me. Here's the error code.
Any ideas?

Here's the full error message:

skpm link max-character-count.sketchplugin/
error Error while reading the package.json file
{ Error: Cannot find module '/Users/kevin.cannon/Repositories/SketchPlugins/max-character-count/max-character-count.sketchplugin/package.json'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/skpm/lib/skpm-link.js:55:17)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3) code: 'MODULE_NOT_FOUND' }

Note, this is just trying to link a skeleton plugin crated via skpm init, so there's nothing fancy in it.

Multiple commands in one file break Sketch

Given a command file test.js containing:

export function foo(){}
export function bar(){}

the output will be:

Object.defineProperty(exports, '__esModule', { value: true });

function foo() {}
function bar() {}

exports.foo = foo;
exports.bar = bar;

However, Sketch doesn't have an exports variable, so this fails. The problem doesn't happen when using export default because the result compiles to var onRun. This means that it isn't possible to hold multiple commands in a single file without some hackery. To work around it, one can do this:

var foo = function (){}
var bar = function (){}

export default function(){
  foo, bar
}

which compiles to:

var foo = function () {};
var bar = function () {};
var onRun = function () {
  foo, bar;
};

onRun can be ignored now that foo and bar are accessible. However, it must be included to ensure something is compiled (the file will be empty otherwise) and the references to foo and bar inside it trick the compiler into thinking they're needed, thus including them.

`logs` command

Something I find myself doing constantly is
tail -f ~/Library/Logs/com.bohemiancoding.sketch3/Plugin\ Output.log

Sometimes this file gets trashed (why?), so you have to do
touch ~/Library/Logs/com.bohemiancoding.sketch3/Plugin\ Output.log and then run it again.

πŸ™ƒ

Do you think it's within the scope of skpm to add a logs command that wraps ^^^? Happy to write the code if you're into it.

Small change to plugin reloading in Sketch 45

Hi there,

we're about to merge a small refactor in the code that watches the Plugin directory for changes, and as a consequence of that, Sketch will no longer automatically load plugins added externally (i.e: via skpm link). It would be nice if skpm would warn users about that, and ask them to relaunch Sketch when linking a new plugin.

The AlwaysReloadScript preference will still work as usual, so the change only affects the linking phase.

store config in `~/.skpmrc`

  • registry URL
  • sketch plugins folder location
  • plugins

We could maybe store the plugins installed and their version here as well so that when setting up a new computer, you just have to add your old .skpmrc and run skpm install. skpm update could use those versions as well?

Importing lodash causes error

Importing or requiring lodash causes the plugin to error.

This may be because lodash depends on node.js?

Here is the error:

SyntaxError: Unexpected token '('. Expected a property name after '.'..
Plugin β€œUntitled”, line 1847:
Β»       return length ? arraybaseRandom.(0, length - 1)() : undefined;

Speed up builds

Added rollup-plugin-progress to compare compilation times between rollup & webpack on the simple react-sketchapp examples β€” feels like rollup is significantly slower the webpack

skpm

initial build ~3500ms
incremental builds w/ watch ~1500ms
incremental builds w/ watch, + disabling treeshake ~1000ms

webpack

initial build ~3500ms
incremental builds ~60ms

Is there a bug in the skpm config? Is there a better watch we can use? Should we disable treeshake?

`skpm link` should autodetect local plugin?

I spent a few minutes trying to find out the right path argument for skpm link. I think it would be nice if it autodetected that it's being run in a plugin development folder, and do the right thing automatically (i.e: make skpm link do a skpm link . under the hood if you run it on a project folder).

Apologies in advance if I'm not making myself very clear, coffee hasn't kicked in yet : )

Question: is there a way to use node `fs` within a plugin?

I’m experimenting with a plugin which uses JSZip to manipulate a .sketch file. For this I’m using a node script which I am now trying to run as a plugin. In order to hand JSZip a sketch file, I’m using fs, require(''fs') makes skpm build throw errors about not being able to resolve fs. Is there a way to access the file system from within a Sketch plugin?

Can't use Cocoa Braces Syntax

I have a section of my plugin where I need to use Cocoa. This is obviously invalid JS, so I'm receiving an error on build.

I have some more details on this post over at the Sketch Plugins forum, but I'm curious how you use Cocoa within your plugins?

Would appreciate guidance on either how to get Cocoa to compile, or how to properly convert to dot notation.

Symlink not showing up in Sketch v45.1

Hi there,

I'm trying to use the symlink but it seems to be broken in Sketch 45.1.
Here's the error when I try to double click the alias to see if there is a problem:
screen shot 2017-07-10 at 4 26 30 pm

publish fails

when I run skpm publish I get this error.

{ Error: Cannot find module '/Users/aaronreisman/n/lib/node_modules/skpm/node_modules/keytar'
    at Function.Module._resolveFilename (module.js:527:15)
    at Function.Module._load (module.js:476:23)
    at Module.require (module.js:568:17)
    at require (internal/module.js:11:18)
    at Function._require [as require] (/Users/aaronreisman/n/lib/node_modules/skpm/node_modules/lazy-require/source/index.js:99:14)
    at Function.installSync (/Users/aaronreisman/n/lib/node_modules/skpm/node_modules/lazy-require/source/index.js:251:23)
    at Function.sync (/Users/aaronreisman/n/lib/node_modules/skpm/node_modules/lazy-require/source/index.js:56:24)
    at lazyRequire (/Users/aaronreisman/n/lib/node_modules/skpm/node_modules/lazy-require/source/index.js:30:66)
    at lazyRequireKeytar (/Users/aaronreisman/n/lib/node_modules/skpm/lib/utils/auth.js:7:18)
    at Object.getToken (/Users/aaronreisman/n/lib/node_modules/skpm/lib/utils/auth.js:24:20) code: 'MODULE_NOT_FOUND' }

Local imports not working

I think there's something up with the rollup config - this doesn't fail with a fresh rollup project. made a vanilla skpm project - it's not related to react-sketchapp.

skpm init & then…

/* my-command.js */
import foo from './foo';

export default function (context) {
  context.document.showMessage(foo())
}

/* foo.js */
const foo = () => 'bar';

export default foo;
Ξ» yarn build
yarn build v0.21.3
$ skpm build
[1/2] πŸ–¨  Copied src/manifest.json in 75ms
error Error while building ./my-command.js
{ Error: 'default' is not exported by src/foo.js
    at error (/usr/local/lib/node_modules/skpm/node_modules/rollup/dist/rollup.js:170:12)
    at Module.error$1 [as error] (/usr/local/lib/node_modules/skpm/node_modules/rollup/dist/rollup.js:8007:2)
    at Module.trace (/usr/local/lib/node_modules/skpm/node_modules/rollup/dist/rollup.js:8106:9)
    at ModuleScope.findDeclaration (/usr/local/lib/node_modules/skpm/node_modules/rollup/dist/rollup.js:7691:22)
    at Scope.findDeclaration (/usr/local/lib/node_modules/skpm/node_modules/rollup/dist/rollup.js:5497:39)
    at Node.bind (/usr/local/lib/node_modules/skpm/node_modules/rollup/dist/rollup.js:6022:28)
    at /usr/local/lib/node_modules/skpm/node_modules/rollup/dist/rollup.js:5291:50
    at Node.eachChild (/usr/local/lib/node_modules/skpm/node_modules/rollup/dist/rollup.js:5305:19)
    at Node.bind (/usr/local/lib/node_modules/skpm/node_modules/rollup/dist/rollup.js:5291:7)
    at Node.bind (/usr/local/lib/node_modules/skpm/node_modules/rollup/dist/rollup.js:6040:23)
  code: 'MISSING_EXPORT',
  url: 'https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module',
  pos: 7,
  loc:
   { file: '/Users/jon_gold/code/jongold/skpm-imports/src/my-command.js',
     line: 1,
     column: 7 },
  frame: '1: import foo from \'./foo\';\n          ^\n2: \n3: module.exports.__skpm_export__ = function (context) {' }
error Command failed with exit code 1.

Attaching the project folder, and a simple rollup example that shows that it should work :)
skpm-imports.zip
rollup-common-js-defaults.zip

access issue

I installed skpm on my personal laptop without any issues, but cant install it on my work laptop. Attached the log file. Any thoughts on how to get around this?
npm-debug.log.zip

Module build failed Unsupported preset format

Hi,

I keep on getting this error when writing "skpm build" :

[1/2] πŸ–¨  Copied src/manifest.json in 7ms
(node:19570) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major version of loader-utils.
error Error while building ./my-command.js
./src/my-command.js
Module build failed: Error: Unsupported preset format: function buildAirbnbPreset(context, options) {
  var transpileTargets = (options && options.targets) ||
    buildTargets(options || {});

  var debug = (options && typeof options.debug === 'boolean') ? !!options.debug : false;

  return {
    presets: [
      require('babel-preset-env').default(null, {
        debug: debug,
        exclude: [
          'transform-async-to-generator',
          'transform-es2015-template-literals',
          'transform-regenerator'
        ],
        modules: false,
        targets: transpileTargets
      }),
      require('babel-preset-react')
    ],
    plugins: [
      options && options.modules === false ? null : modules,
      [require('babel-plugin-transform-es2015-template-literals'), {
        spec: true
      }],
      require('babel-plugin-transform-es3-member-expression-literals'),
      require('babel-plugin-transform-es3-property-literals'),
      require('babel-plugin-transform-jscript'),
      [require('babel-plugin-transform-object-rest-spread'), {
        useBuiltIns: true
      }]
    ].filter(Boolean)
  };
}.

Could you please help me ?

issue importing npm packages

when running the following code and trying to run skpm build I get the following error:

code:

import emmet from 'emmet';
import 'emmet/bundles/snippets';
import 'emmet/bundles/caniuse';

export default emmet;

error:
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

any help would be appreciated here. Thanks!

Patreon? Sponsorship?

This is the first solid development system I've seen for Sketch. I love this, really. Are there any plans to add some sort of sponsorship? I want to see this continue to build momentum.

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.