Giter Site home page Giter Site logo

tedium's People

Contributors

abdonrd avatar ankon avatar aomarks avatar dfreedm avatar e111077 avatar justinfagnani avatar rictic avatar samuelli avatar stramel avatar timvdlippe avatar

Stargazers

 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tedium's Issues

Cleanup passes Typescript and Travis are incompatible

The Travis pass overrides the install script (

// Override install script for all elements
const install =
[`npm install -g ${tools.join(' ')}`, 'polymer install --variants'];
if (!Array.isArray(travis.install) || !arraysEqual(travis.install, install)) {
travis.install = install;
}
), but the TypeScript pass actually introduces npm dependencies to be able to generate the TypeScript definitions.

To this end, when you run both Travis and TypeScript, the command npm install (which is the default Travis install command) is no longer run, thus the npm dependencies for gen-typescript-declarations are no longer installed.

Instead, the current commands in install should be moved to the first lines of before_script, such that install once again runs npm install on Travis.

Travis pass does not check existence of `polymer.json`

The Travis pass currently adds linting to the script (

// Add polymer lint to all elements
const beforeScript = ['polymer lint'];
if (!Array.isArray(travis.before_script) ||
!arraysEqual(travis.before_script, beforeScript)) {
travis.before_script = beforeScript;
}
), however this will fail if polymer.json does not exist in the repository (which is the case for almost all elements).

The Travis pass (or maybe a different pass) should therefore generate a simple polymer.json with the correct linting configuration. Probably for the elements this should be

{
  "lint": {
      "rules": ["polymer-2-hybrid"]
  }
}

Update .travis.yml

Purposed Changes:

  • Travis has pushed a shorthand for installing chrome chrome: stable like how firefox is handled.
  • Override the install phase to have the install commands
    • Use polymer install --variants to install any variants
  • Add polymer lint to the before_scripts
  • Add a polymer.json for the linter.
  • Run in containerized environment (sudo: false)
  • Update test command to run variants, polymer test will run all variants in all browsers
    • use polymer test instead of polymer test -l chrome and polymer test -l firefox
  • Could also incorporate the node_modules caching into this if you want as well.

I am more than willing to put out a PR if you guys are good with these changes.

purposed .travis.yml

language: node_js
sudo: false
before_script:
  - polymer lint
install:
  - npm install -g polymer-cli
  - polymer install --variants
env:
  global:
    - secure: >-
        INSERT_KEY
    - secure: >-
        INSERT_KEY
node_js: stable
addons:
  firefox: latest
  chrome: stable
  sauce_connect: true
script:
  - xvfb-run polymer test
  - >-
    if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then polymer test -s 'default';
    fi
dist: trusty

Consistency "PolymerElements" vs "polymerelements" in bower.json for webjars usage

This ticket was first created by me in the PolymerElements/app-layout#293 and @abdonrd kindly ask me if I can created it in tedium as well, which seems to be a good place for it.

Description

Many PolymerElements github projects like the app-layout element is using "polymerelements" in its bower.json file to reference dependecies.

Like: polymerelements/iron-flex-layout#^1.0.0

While other popular Polymer elements like paper-checkbox, paper-button use "PolymerElements"

Like PolymerElements/iron-flex-layout#^1.0.0

Other Polymer elements use a mixture like app-route

I assume this does not matter in the JavaScript and Bower world. But I'm trying to figure out if it is possible to use Polymer-Elements in Java/JVM based micro services. In the Java world dependencies are pulled together from so called "Maven-Repositories".

There is a very nice effort to bridge the Bower/NPM things with Maven-Repositories in the project http://www.webjars.org/ . Webjars.org works fairly well for pure javascript dependencies, but less well for PolymerElements (and they have many transitive dependencies by nature). Many PolymerElements artifacts appear twice with the lower and upper case version of the github name "PolymerElements".

github-com-PolymerElements-iron-flex-layout
github-com-polymerelements-iron-flex-layout

This is an issue for JVM based software where letter case matters.

Expected outcome

It would be nice if all PolymerElements would consistently use "PolymerElements" because this is the github name of the project.

Steps to reproduce

Look at the bower.json files of the various projects

Browsers Affected

This does not affect bowsers. This affects Java build system like Maven, Gradle, SBT but seems to be no problem for JavaScript users that use Bower.

Plugin model for cleanup passes

I did not find any place where all available mixin are aggregated.
Maybe Tedium is a good candidate to build such dictionary across the component database?

Add auto syntax-highlighting for code snippets

(I hope this is the correct place for this request)

When reading the autogenerated docs, the snippets are a bit hard to read/extract from the other documentation. Syntax highlighting could help with this problem. The visual difference of the highlighting makes distinguishing code snippets from pure docs easier. It would be nice if the bot could detect these snippets and automatically add ```HTML in front of it and closes it with ```.

For example in the paper-input docs replace

<paper-input-container>
  <input is="iron-input" maxlength="20">
  <paper-input-char-counter></paper-input-char-counter>
</paper-input-container>

with

<paper-input-container>
  <input is="iron-input" maxlength="20">
  <paper-input-char-counter></paper-input-char-counter>
</paper-input-container>

In markdown code:
```HTML
<paper-input-container>
ย ย <input is="iron-input" maxlength="20">
ย ย <paper-input-char-counter></paper-input-char-counter>
</paper-input-container>
```

Add extra note that if `--maxChanges` is not passed in, developers can manually push

At first I thought I should always use --maxChanges to actually push the updates to the repository. Later, I discovered I can just run it without and manually push from the freshly cloned repository.

It would be great to either add this to the README or add a comment that, when this argument is not passed in, it states you can manually make modifications and then push changes.

Travis pass crashes when `sauce-credentials.json` does not exist

It would be nicer to have a descriptive error message for this. At first, I was searching for this file in the repository I was modifying, but instead it was supposed to be in the folder that I run the command. I think adding a simple if (!fs.existSync) with a nice error should be sufficient.

Add compilation with closure compiler to travis for all elements

This is desirable as it will catch a number of bugs and documentation errors, as well as reducing the impedance mismatch for folks who want to compile Polymer.

Steps:

  • prototype a basic open source closure compiler flow
  • test out travis integration
  • apply the travis integration for all elements with tedium

CLI arguments for more "recipes"

It would be great to make give tedium tasks by the CLI:

tedium --task add-travis-config --task add-travis-badge --task generate-readme

WDYT?

Option `prBranchName` is ignored

Whenever I run the file with --prBranchName gen-typescript-declarations, it will still create the branch named auto-cleanup and simply ignore the input value. Note that any change in capitalization or the usage of - reports in an unknown argument, so the argument should have the correct name but it simply does nothing.

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.