Skip to content
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.

transform all files, not just those with names ending .js #6

Merged
merged 2 commits into from
Sep 19, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { attachScopes, createFilter } from 'rollup-pluginutils';
import { extname, sep } from 'path';
import { sep } from 'path';
import { walk } from 'estree-walker';
import { parse } from 'acorn';
import makeLegalIdentifier from './makeLegalIdentifier';
Expand Down Expand Up @@ -90,7 +90,6 @@ export default function inject ( options ) {
transform ( code, id ) {
if ( !filter( id ) ) return null;
if ( code.search( firstpass ) == -1 ) return null;
if ( extname( id ) !== '.js' ) return null;

let ast;

Expand Down