Skip to content
This repository has been archived by the owner on Apr 22, 2020. It is now read-only.

Package.json for usage with npm #405

Closed
wants to merge 2 commits into from

Conversation

tseabra-rocket
Copy link

No description provided.

@Kyle-Mendes
Copy link

I believe this is missing a module.exports = prettyPrint; at the end of prettify.js. Right now, var prettyPrint = require('code-prettify'); and then prettyPrint() will result in Uncaught TypeError: prettyPrint is not a function

@tseabra-rocket
Copy link
Author

with browserify you can use "browser" param on your package.json and it will work.
But you guys should take a look at the jsHint errors there are a lot of them and I was had a lot of trouble compiling this.
thanks

@mikesamuel
Copy link
Contributor

Is https://gist.github.com/defunctzombie/4339901 the browser thing you were talking about?

@Kyle-Mendes
Copy link

https://github.com/Pink401k/code-prettify This will work using npm install and prettyPrint = require('code-prettify');.

I'm using it on a React project now, which is why I wanted to get it to work with just npm and using the module export.

@philwareham
Copy link

Bumping this - would be very useful to be able to install this package via NPM

@Kyle-Mendes
Copy link

@philwareham If you npm install the repository I linked above, it will work for you until a fix is pulled in for this Repo :)

@pablodenadai
Copy link

It'd be great to have this package in npm.

@Kyle-Mendes
Copy link

@mikesamuel If you check out the changes on my fork, you can get it working pretty easily. The big thing is changing the information in the package.json To be the information that you would like to display. Mainly, author, contributors, name and version. You could then run npm publish to push it to npm so people can install by running npm install code-prettify

https://docs.npmjs.com/cli/publish for more information.

@amroamroamro
Copy link
Contributor

added package.json in #469

@alex-milanov
Copy link
Contributor

#476 I've created a pull request with small changes so that it can be used inside of a npm based pipeline

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants