-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Contribute to the thought process for 3rd party language packaging if you'd like #2
Comments
I tried to minify the file |
You don't want to minify it yourself - it's not JUST a minified file - it's a packaged CDN ready file, that's what the new build system is for. If you're using my branch that has the new build system and your language is in:
Will build the |
You should be exporting a module though: module.exports = function (hljs) { |
The command |
In spite of it, do the minified files seem OK to you? |
How does it not work? Are you using the branch with the new build system? |
It's not a CDN module. CDN modules include the registration code so that all you have to do is include the JS tag... and NOTHING else. |
What is cypher vs cypher original? If you're publishing two entirely different languages you need a slightly different structure, more like how the core library does it. |
Here is what a CDN module looks like:
|
The The |
You only need the original file, you don't need special code to make it work in a browser... that's what the new build process does for you. :-) And it will generate the
|
You need to be on the |
OK, I created a folder |
Of course your |
Now I understood. But I do not like to use git@git. I prefer the HTTPS:// Is it possible? |
You can check them out however you like... what's important is where the folders are. |
I just fixed package.json locally and changed your main file back to doing |
I can make PR if you ant, but you'll still need the correct branch to run the build script. |
You can make a PR now. But firstly will I need to correct the branch? |
You can't build it (the file in |
In the new branch |
squash_build_pipeline is a branch of highlight.js. It's not a branch you have to create. |
Inside highlight.js folder this might help:
|
|
That's an older copy of the branch... the latest is:
|
Maybe you need to |
I did, but the error is still insistant. Maybe I will git-reset to your latest communit 3ffc2bbf2fe34d501d125c908c2d1d7014ad893a. |
Yeah you might have your local branches pointed to the wrong revision. git is just instinctive to me but without being in front of your computer it's hard to tell you what to do, fetch, pull, etc... plus I don't know what remotes you have, etc. :-) |
But not successful yet...
I used HTTPS instead of SSH. See how I did:
Did I do something wrong? |
The log:
I switched to
|
What are your remotes? The latest commit for both my repo and |
Ah I have force pushed it IIRC, so you might need to |
AH, I got, the official repository does not have your latest commit in both branches. Your latest commit is in your repository: https://github.com/yyyc514/highlight.js/tree/squash_build_pipeline. |
Ah. Fixed. :) Too many repos. I did finally rename my remotes so now I'm my own origin. This should help in the future. :-) |
Ah, and it worked. I saw cypher files were minified. Should I do anything else? |
Your README probably need to be updated to follow the new conventions. See robots-txt repo for an example. |
Ready. |
You shouldn't include this unless you're actually going to publish your package to NPM.
You should change the RobotsTxt variable name:
|
Actually I published to NPM. |
Ready. |
The link isn't working: https://unpkg.com/highlightjs-cypher@master/dist/cypher.min.js |
Fixed, @yyyc514. |
Looking pretty good. Still not sure where your markup expect test files are. Did you just not commit them? |
Ah, you have removed the expect test files. I will check the old commits to download the old files. |
I have just added the missed file |
Anything else, @yyyc514 ? |
I'm not sure you're understanding how it works. For markup tests you need TWO files for each test:
You should be able to run the test suite from inside the The custom test scaffold you write LOOKs like you understood the system, but then the files aren't there - so your own tests would never have passed (that I can see). |
Hello @yyyc514 ! I am very sorry for my long absence. The company overcharged me with a lot of things.
The neo4j/Cypher is not inside HTML. It is inside PHP/JavaScript/JSON on a HTML file. |
Pretend I said "the correct output"... the test files are just:
|
@yyyc514 , I think @Mogztter has already done it. See the latest commit and if those test files are what you want exactly. |
Yeah that looks like the idea. |
The repository is ready. |
Suggest closing? |
As a maintainer of a Highlight.js language grammar you might be interested in the discussion of an official packaging format. I just created an issue to track the discussion and I've been working on this along with the new build system.
highlightjs/highlight.js#2328
Sorry for the spam, but I couldn't think of an easier way to ping the people who might be most interested in weighing in on the subject. Feel free to simply close this issue or leave it open (whatever works best for you!).
The text was updated successfully, but these errors were encountered: