qleaner 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/cli.js CHANGED
@@ -12,8 +12,11 @@ program
12
12
  program
13
13
  .command("qlean")
14
14
  .description("List all the imports in the project")
15
- .action(async () => {
16
- const imports = await getFiles();
15
+ .argument("<path>", "The path to the directory to scan for imports")
16
+ .action(async (path) => {
17
+ console.log(path);
18
+ const imports = await getFiles(path);
17
19
  });
18
20
 
21
+
19
22
  program.parse(process.argv);
package/command.js CHANGED
@@ -4,8 +4,8 @@ const parser = require("@babel/parser");
4
4
  const traverse = require("@babel/traverse").default;
5
5
 
6
6
 
7
- module.exports = async function getFiles() {
8
- const files = await fg(["src/**/*.{tsx,ts,js,jsx}"]);
7
+ module.exports = async function getFiles(directory = "src") {
8
+ const files = await fg([`${directory}/**/*.{tsx,ts,js,jsx}`]);
9
9
  const imports = [];
10
10
  for (const file of files) {
11
11
  const code = fs.readFileSync(file, "utf8");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "qleaner",
3
3
  "packageManager": "yarn@4.6.0",
4
- "version": "1.0.3",
4
+ "version": "1.0.4",
5
5
  "main": "command.js",
6
6
  "bin": "./bin/cli.js",
7
7
  "scripts": {
package/src/3.png ADDED
Binary file
package/src/4.png ADDED
Binary file
@@ -0,0 +1,7 @@
1
+ export default function Demo() {
2
+ return (
3
+ <div>
4
+ <img src="/one.png" />
5
+ </div>
6
+ )
7
+ }
@@ -0,0 +1,18 @@
1
+ export function demoFunction() {
2
+ return 'demoFunction';
3
+ }
4
+ export function demoFunction2() {
5
+ return 'demoFunction2';
6
+ }
7
+ export function demoFunction3() {
8
+ return 'demoFunction3';
9
+ }
10
+ export function demoFunction4() {
11
+ return 'demoFunction4';
12
+ }
13
+ export function demoFunction5() {
14
+ return 'demoFunction5';
15
+ }
16
+ export function demoFunction6() {
17
+ return 'demoFunction6';
18
+ }
File without changes
package/src/jambo.tsx ADDED
@@ -0,0 +1,12 @@
1
+ import * as functions from './demo/functions';
2
+ import hello from 'hello.find';
3
+ export const JAMBO_JET = 'poa'
4
+
5
+ export function JamboJet() {
6
+ return (
7
+ <div>
8
+ <img src={one} />
9
+ <img src={'3.png'} />
10
+ </div>
11
+ )
12
+ }
package/src/main.js ADDED
@@ -0,0 +1,5 @@
1
+ import jambo from 'jambo'
2
+ import poa from 'poa'
3
+ import './style.css'
4
+ import demo from './demo/demo'
5
+ import { JamboJet } from './jambo'
package/src/one.png ADDED
Binary file
package/src/poa.tsx ADDED
@@ -0,0 +1,10 @@
1
+ import one from 'one.png'
2
+ export default function poa() {
3
+ console.log('poa')
4
+ return (
5
+ <div>
6
+ <img src={one} />
7
+ <img src={'3.png'} />
8
+ </div>
9
+ )
10
+ }
package/src/style.css ADDED
@@ -0,0 +1,7 @@
1
+ .name {
2
+ background-image: url('one.png') no-repeat;
3
+ }
4
+
5
+ .user {
6
+ background-image: url('two.png');
7
+ }
package/src/style.scss ADDED
@@ -0,0 +1,3 @@
1
+ .body {
2
+ background-image: url('4.png');
3
+ }
package/src/two.png ADDED
Binary file