Commit graph

20 commits

Author SHA1 Message Date
Abe Jellinek
384d4ace7e
fx-compat: Remove most Babel plugins (#2855)
We still need `babel-plugin-transform-es2015-modules-commonjs`, but everything
else is redundant in fx102 and mangles output code unnecessarily.
2022-10-06 18:53:07 -04:00
Dan Stillman
21df5d12b7 Add @babel/plugin-proposal-unicode-property-regex
Can now use Unicode property escapes in regular expressions

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Unicode_Property_Escapes
2021-08-22 04:07:33 -04:00
Dan Stillman
4021492797 Babel: Add support for optional chaining
https://babeljs.io/docs/en/babel-plugin-proposal-optional-chaining
2021-08-17 00:41:59 -04:00
Fletcher Hazlehurst
36d81e839c Use ace-builds NPM package 2020-12-18 10:45:38 -07:00
Dan Stillman
2b6c975d1e Don't convert tabs to spaces in Scaffold templates
And don't run ACE files through Babel either
2020-04-09 01:28:08 -04:00
Dan Stillman
d9cee322cd Tag selector performance overhaul
- Use react-virtualized to render tags on demand, reducing the number
  of DOM elements from potentially tens of thousands to <100. This
  requires tags to be absolutely positioned, so sizing and
  positioning need to be precomputed rather than relying on CSS.
- Avoid unnecessary refreshes, speed up tag retrieval, and optimize
  sorting
- Debounce reflowing when resizing tag selector

Also:

- Scroll to top when changing collections
- Allow tags to take up full width of tag selector without truncation

Closes #1649
Closes #281
2019-03-28 06:28:34 -04:00
Dan Stillman
c52589f96b Upgrade to Babel 7 2019-03-28 04:57:31 -04:00
Dan Stillman
14d25d273a Symlink everything in resource/ and chrome/content/zotero/xpcom/rdf/ 2019-03-20 04:39:33 -04:00
Tom Najdek
897e74c7f1 Reactify the Tag Selector 2019-01-07 15:33:45 +02:00
Dan Stillman
ce5be0bc75 Automatically download open-access PDFs when saving via the connector
If there's no translated PDF or the translated PDF fails and the item
has a DOI, check Zotero's Unpaywall mirror for possible sources and try
to download one of those.

Unlike with "Add Item by Identifier" and "Find Available PDF" in the
item context menu, this does not try the DOI/URL page, since it would
result in more data leakage and most of the time you'd be saving from
the DOI page already. We could consider offering it as an option, but
for it to be useful, you'd have to have an institutional subscription,
be on-campus or connected via VPN (for now), and be saving from
somewhere other than the main page.

A new connector endpoint, sessionProgress, takes the place of
attachmentProgress. Unlike attachmentProgress, sessionProgress can show
new attachments that have been added to the save, and with a little more
work should also be able to show when a parent item has been recognized
for a directly saved PDF.

This also adds support for custom PDF resolvers, available to all PDF
retrieval methods. I'll document those separately.

Closes #1542
2018-08-16 00:57:22 -04:00
Dan Stillman
92dcd41a0a Remove obsolete line from Babel config
The whole resource/tinymce directory is symlinked now.
2018-03-11 01:42:34 -05:00
Dan Stillman
c784db88a8 Remove unused Babel syntax plugins 2017-10-31 22:33:01 -04:00
Dan Stillman
e14b8f94bd Remove babel-plugin-transform-async-to-module-method
Everything we support supports async/await now, so stop converting to
Bluebird coroutine().
2017-10-05 17:18:43 -04:00
Tom Najdek
b53fabbb58 Better build process (#1248)
* Remove gulp, replace with custom scripts
* Symlink entire dirs where possible (fixes #1232)
* Significantly speed up subsequent builds (fixes #1238)
* Watch process now observes new/removed files, not only changed
* Add ignoreMask, exclude all files with names starting with a #
* Better logging during builds
* Update travis.yml to use new, non-gulp-based build
2017-06-20 19:18:46 -04:00
Tom Najdek
4ca3cf1487 Ignore all bluebird files when processing during the build 2017-06-06 00:36:03 -04:00
Dan Stillman
522391bc3e Enable retainLines in Babel config
Addresses #1235 (maybe sufficiently, depending on how much we care about
wacky code in the builds)
2017-06-01 15:39:42 -04:00
Tom Najdek
289b049377 Support generators in tests via coMocha, instead of custom code
* coMocha offers better error stack trace
2017-06-01 11:36:17 -04:00
Tom Najdek
14bf3184bb Fixes and tweaks to make tests work with babelized code
* Use mocha, chai & sinon from the npm. As of sinon 2.0
  sinon-as-promised is no longer required so it is removed
* Tweak code to re-use the same loader with the same environment
  throghout the code
* Introduce browserify step for testing tools that only provide
  node-compatible libraries (sinon, chai-as-promised)
* Introduce copy step for test data to resolve multiple issues with
  tests depending on files not being symlinks
* Re-introduce custom implementation of setTimeout to resolve issues
  with few tests
* Re-introduce custom Bluebird Promises config & monkey patch
2017-06-01 11:36:16 -04:00
Dan Stillman
6afc58a629 Move require() into ZoteroContext and fix Bluebird module path 2017-05-24 00:58:41 -04:00
Tom Najdek
9aa057edee Introduce a build system
* Add a multi-process, gulp-based build system to support es6 features,
  async/await, jsx and scss
* Add a package.json to support dependency management and allow starting
  the build process via npm
* Replace embedded Bluebird library with npm-installed one
* Add react, react-dom and web-library
* Introduce a custom require() loader in include.js as well as a minimal
  local require() implementation in various other places
2017-05-23 17:02:50 +01:00