25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

package.json 1.8KB

Parser rewrite This commit is a complete rewrite of the core mustache.js file with two main goals: 1) a major performance boost and 2) better compliance with the mustache spec. In order to improve performance templates are pre-compiled to JavaScript functions. These compiled functions take a view, a partials object, and an optional callback as arguments. They are cached to prevent unnecessary re-compilation of an already compiled template. Both of these enhancements facilitate a generous boost in performance. A few other notes: - The mustache.js file is now both browser and CommonJS ready without any modification. - The API exposes two main methods: Mustache.compile and Mustache.render. The former is used to generate a function for a given template, while the latter is a higher-level function that is used to compile and render a template in one shot. Mustache.to_html is still available for backwards compatibility. - The concept of pragmas is removed to conform more closely to the original mustache spec. The dot symbol still works to reference the current item in an array. - The parser is much more strict about whitespace than it was before. The rule is simple: if a line contains only a non-variable tag (i.e. not {{tag}} or {{{tag}}}) and whitespace, that line is ignored in the output. Users may use the "space" option when compiling templates to preserve every whitespace character in the original template. - The parser is able to provide detailed information about where errors occur when parsing and rendering templates, including the line number and surrounding code context.
14 년 전
Parser rewrite This commit is a complete rewrite of the core mustache.js file with two main goals: 1) a major performance boost and 2) better compliance with the mustache spec. In order to improve performance templates are pre-compiled to JavaScript functions. These compiled functions take a view, a partials object, and an optional callback as arguments. They are cached to prevent unnecessary re-compilation of an already compiled template. Both of these enhancements facilitate a generous boost in performance. A few other notes: - The mustache.js file is now both browser and CommonJS ready without any modification. - The API exposes two main methods: Mustache.compile and Mustache.render. The former is used to generate a function for a given template, while the latter is a higher-level function that is used to compile and render a template in one shot. Mustache.to_html is still available for backwards compatibility. - The concept of pragmas is removed to conform more closely to the original mustache spec. The dot symbol still works to reference the current item in an array. - The parser is much more strict about whitespace than it was before. The rule is simple: if a line contains only a non-variable tag (i.e. not {{tag}} or {{{tag}}}) and whitespace, that line is ignored in the output. Users may use the "space" option when compiling templates to preserve every whitespace character in the original template. - The parser is able to provide detailed information about where errors occur when parsing and rendering templates, including the line number and surrounding code context.
14 년 전
Use ngrok rather than localtunnel when running browser tests (#668) These changes makes zuul use ngrok for exposing itself to the outside world, rather than the default localtunnel implementation. That's because we've had quite a lot of issues with flakyness which seems to be related to localtunnel, e.g.: ``` - starting: <internet explorer 9 on Windows 2008> events.js:160 throw er; // Unhandled 'error' event ^ Error: connection refused: localtunnel.me:44896 (check your firewall settings) at Socket.<anonymous> (/home/travis/build/janl/mustache.js/node_modules/localtunnel/client.js:84:32) at emitOne (events.js:96:13) at Socket.emit (events.js:188:7) at emitErrorNT (net.js:1290:8) at _combinedTickCallback (internal/process/next_tick.js:80:11) at process._tickCallback (internal/process/next_tick.js:104:9) ``` I thought this was fixed by [using Node.js 6 instead of Node.js 4](https://github.com/janl/mustache.js/pull/667), but sadly that was not the case as it re-appeared with Node.js 6 as well. Had to use a [custom version of zuul-ngrok](https://github.com/rase-/zuul-ngrok/pull/12) which contains a newer version of ngrok. The dependency used by the upstream module threw an error when running on my computer, the updated version worked as a charm though. We should change to using the upstream module as soon as the PR with that ngrok version bump lands. Set `concurrency: 1` otherwise ngrok would fail and make IE11 tests stall forever because of too many connections being made within a short time period. I've notice it can take quite some time (20+ minutes) to get all the tests through as it seems ngrok still seems to throttle the connections somehow, but the important thing is getting these tests to work.
7 년 전
Parser rewrite This commit is a complete rewrite of the core mustache.js file with two main goals: 1) a major performance boost and 2) better compliance with the mustache spec. In order to improve performance templates are pre-compiled to JavaScript functions. These compiled functions take a view, a partials object, and an optional callback as arguments. They are cached to prevent unnecessary re-compilation of an already compiled template. Both of these enhancements facilitate a generous boost in performance. A few other notes: - The mustache.js file is now both browser and CommonJS ready without any modification. - The API exposes two main methods: Mustache.compile and Mustache.render. The former is used to generate a function for a given template, while the latter is a higher-level function that is used to compile and render a template in one shot. Mustache.to_html is still available for backwards compatibility. - The concept of pragmas is removed to conform more closely to the original mustache spec. The dot symbol still works to reference the current item in an array. - The parser is much more strict about whitespace than it was before. The rule is simple: if a line contains only a non-variable tag (i.e. not {{tag}} or {{{tag}}}) and whitespace, that line is ignored in the output. Users may use the "space" option when compiling templates to preserve every whitespace character in the original template. - The parser is able to provide detailed information about where errors occur when parsing and rendering templates, including the line number and surrounding code context.
14 년 전
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. {
  2. "name": "mustache",
  3. "version": "4.1.0",
  4. "description": "Logic-less {{mustache}} templates with JavaScript",
  5. "author": "mustache.js Authors <http://github.com/janl/mustache.js>",
  6. "homepage": "https://github.com/janl/mustache.js",
  7. "repository": {
  8. "type": "git",
  9. "url": "https://github.com/janl/mustache.js.git"
  10. },
  11. "keywords": [
  12. "mustache",
  13. "template",
  14. "templates",
  15. "ejs"
  16. ],
  17. "main": "mustache.js",
  18. "bin": {
  19. "mustache": "./bin/mustache"
  20. },
  21. "files": [
  22. "bin/",
  23. "mustache.mjs",
  24. "mustache.min.js",
  25. "wrappers/"
  26. ],
  27. "volo": {
  28. "url": "https://raw.github.com/janl/mustache.js/{version}/mustache.js"
  29. },
  30. "scripts": {
  31. "build": "rollup mustache.mjs --file mustache.js --format umd --name Mustache --banner \"// This file has been generated from mustache.mjs\" && uglifyjs mustache.js > mustache.min.js",
  32. "test": "npm run test-lint && npm run test-unit",
  33. "test-lint": "eslint mustache.mjs bin/mustache test/**/*.js",
  34. "test-unit": "mocha --reporter spec test/*-test.js",
  35. "test-render": "mocha --reporter spec test/render-test",
  36. "pre-test-browser": "node test/create-browser-suite.js",
  37. "test-browser": "npm run pre-test-browser && zuul -- test/context-test.js test/parse-test.js test/scanner-test.js test/render-test-browser.js",
  38. "test-browser-local": "npm run pre-test-browser && zuul --local 8080 -- test/context-test.js test/scanner-test.js test/parse-test.js test/render-test-browser.js"
  39. },
  40. "devDependencies": {
  41. "chai": "^3.4.0",
  42. "eslint": "^6.5.1",
  43. "jshint": "^2.9.5",
  44. "mocha": "^3.0.2",
  45. "puppeteer": "^2.0.0",
  46. "rollup": "^1.26.3",
  47. "uglify-js": "^3.4.6",
  48. "zuul": "^3.11.0",
  49. "zuul-ngrok": "nolanlawson/zuul-ngrok#patch-1"
  50. },
  51. "greenkeeper": {
  52. "ignore": [
  53. "eslint"
  54. ]
  55. },
  56. "license": "MIT"
  57. }